Merge "Enable "auto rotate" for resizable AVD" into sc-v2-dev

This commit is contained in:
Huan Song
2021-10-12 22:43:41 +00:00
committed by Android (Google) Code Review

View File

@@ -96,6 +96,9 @@ public class DefaultActivity extends Activity {
Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT, "1"); Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT, "1");
Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, "1"); Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, "1");
Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_WM_DISPLAY_SETTINGS_PATH, "vendor/etc/display_settings_freeform.xml"); Settings.Global.putString(getContentResolver(), Settings.Global.DEVELOPMENT_WM_DISPLAY_SETTINGS_PATH, "vendor/etc/display_settings_freeform.xml");
} else if ("resizable".equals(displaySettingsName)) {
// Enable auto rotate for resizable AVD
Settings.System.putString(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, "1");
} }
} }