From c8ea9a76c28e3d715ab0f9ddabbee414185ea2cf Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Mon, 14 Sep 2015 15:08:02 +0200 Subject: [PATCH] Added "DEBUG" Title to debuggable builds. --- .../java/org/somenet/android/helloworld2/MainActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/somenet/android/helloworld2/MainActivity.java b/app/src/main/java/org/somenet/android/helloworld2/MainActivity.java index 44844e9..f683e39 100644 --- a/app/src/main/java/org/somenet/android/helloworld2/MainActivity.java +++ b/app/src/main/java/org/somenet/android/helloworld2/MainActivity.java @@ -1,5 +1,6 @@ package org.somenet.android.helloworld2; +import android.content.pm.ApplicationInfo; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; @@ -11,6 +12,9 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + if ((0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE))) { + setTitle(getTitle() + " DEBUG"); + } } @Override -- 2.43.0