OSDN Git Service

Settings: Conditionally remove Buttons tile from Dashboard
authorBrandon McAnsh <brandon.mcansh@gmail.com>
Tue, 18 Nov 2014 20:29:21 +0000 (15:29 -0500)
committerAdnan Begovic <adnan@cyngn.com>
Tue, 22 Dec 2015 20:45:56 +0000 (12:45 -0800)
Change-Id: Iaddd3dd87ea2b0b04e3f312a156a6a25a948d039
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
src/com/android/settings/SettingsActivity.java

index 0613708..e0be0f5 100644 (file)
@@ -1319,6 +1319,12 @@ public class SettingsActivity extends Activity
                             UserManager.DISALLOW_DEBUGGING_FEATURES)) {
                         removeTile = true;
                     }
+                } else if (id == R.id.button_settings) {
+                    boolean hasDeviceKeys = getResources().getInteger(
+                            com.android.internal.R.integer.config_deviceHardwareKeys) != 0;
+                    if (!hasDeviceKeys) {
+                        removeTile = true;
+                    }
                 }
 
                 if (UserHandle.MU_ENABLED && UserHandle.myUserId() != 0