diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 99a78c574ff..af2123aa3a1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -3276,6 +3276,19 @@ android:value="true"/> + + + + + + + + + + diff --git a/src/com/android/settings/development/qstile/DevelopmentTiles.java b/src/com/android/settings/development/qstile/DevelopmentTiles.java index 916c6c92918..b8af7403254 100644 --- a/src/com/android/settings/development/qstile/DevelopmentTiles.java +++ b/src/com/android/settings/development/qstile/DevelopmentTiles.java @@ -432,4 +432,31 @@ public abstract class DevelopmentTiles extends TileService { enabled ? ADB_SETTING_ON : ADB_SETTING_OFF); } } + + /** + * Tile to control the "Show taps" developer setting + */ + public static class ShowTaps extends DevelopmentTiles { + private static final int SETTING_VALUE_ON = 1; + private static final int SETTING_VALUE_OFF = 0; + private Context mContext; + + @Override + public void onCreate() { + super.onCreate(); + mContext = getApplicationContext(); + } + + @Override + protected boolean isEnabled() { + return Settings.System.getInt(mContext.getContentResolver(), + Settings.System.SHOW_TOUCHES, SETTING_VALUE_OFF) == SETTING_VALUE_ON; + } + + @Override + protected void setIsEnabled(boolean isEnabled) { + Settings.System.putInt(mContext.getContentResolver(), + Settings.System.SHOW_TOUCHES, isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF); + } + } }