Schematize Display system properties
Properties accessed across partitions are now schematized and will become APIs to make explicit interfaces among partitions. Bug: 117924132 Test: m -j Change-Id: I83b40ddfcde32d8d03fae73f5c252013933c466c
This commit is contained in:
@@ -27,6 +27,7 @@ import android.os.SystemProperties;
|
||||
import android.provider.Settings;
|
||||
import android.service.quicksettings.Tile;
|
||||
import android.service.quicksettings.TileService;
|
||||
import android.sysprop.DisplayProperties;
|
||||
import android.util.Log;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.ThreadedRenderer;
|
||||
@@ -98,12 +99,12 @@ public abstract class DevelopmentTiles extends TileService {
|
||||
|
||||
@Override
|
||||
protected boolean isEnabled() {
|
||||
return SystemProperties.getBoolean(View.DEBUG_LAYOUT_PROPERTY, false);
|
||||
return DisplayProperties.debug_layout().orElse(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setIsEnabled(boolean isEnabled) {
|
||||
SystemProperties.set(View.DEBUG_LAYOUT_PROPERTY, isEnabled ? "true" : "false");
|
||||
DisplayProperties.debug_layout(isEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +140,7 @@ public abstract class DevelopmentTiles extends TileService {
|
||||
protected void setIsEnabled(boolean isEnabled) {
|
||||
Settings.Global.putInt(
|
||||
getContentResolver(), Settings.Global.DEVELOPMENT_FORCE_RTL, isEnabled ? 1 : 0);
|
||||
SystemProperties.set(Settings.Global.DEVELOPMENT_FORCE_RTL, isEnabled ? "1" : "0");
|
||||
DisplayProperties.debug_force_rtl(isEnabled);
|
||||
LocalePicker.updateLocales(getResources().getConfiguration().getLocales());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user