OSDN Git Service

Hide tap to wake on devices that don't support it
authorJason Monk <jmonk@google.com>
Mon, 8 Jun 2015 13:11:48 +0000 (09:11 -0400)
committerJason Monk <jmonk@google.com>
Wed, 10 Jun 2015 20:16:10 +0000 (16:16 -0400)
Bug: 21650579
Change-Id: I3fbcccc80b5773c74d8398f1d23b4762a5bf54ed

src/com/android/settings/DisplaySettings.java

index 271c993..eef3c6b 100644 (file)
@@ -490,6 +490,9 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
                     if (!RotationPolicy.isRotationLockToggleVisible(context)) {
                         result.add(KEY_AUTO_ROTATE);
                     }
+                    if (!isTapToWakeAvailable(context.getResources())) {
+                        result.add(KEY_TAP_TO_WAKE);
+                    }
                     return result;
                 }
             };