Merge "Sdksetup: Set path for display settings file for freeform display" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9b4e646bda
@@ -50,6 +50,7 @@ public class DefaultActivity extends Activity {
|
|||||||
if (Build.IS_EMULATOR) {
|
if (Build.IS_EMULATOR) {
|
||||||
// Set physical keyboard layout based on the system property set by emulator host.
|
// Set physical keyboard layout based on the system property set by emulator host.
|
||||||
String layoutName = SystemProperties.get("vendor.qemu.keyboard_layout");
|
String layoutName = SystemProperties.get("vendor.qemu.keyboard_layout");
|
||||||
|
String displaySettingsName = SystemProperties.get("ro.boot.qemu.display.settings.xml");
|
||||||
String deviceName = "qwerty2";
|
String deviceName = "qwerty2";
|
||||||
InputDevice device = getKeyboardDevice(deviceName);
|
InputDevice device = getKeyboardDevice(deviceName);
|
||||||
if (device != null && !layoutName.isEmpty()) {
|
if (device != null && !layoutName.isEmpty()) {
|
||||||
@@ -78,6 +79,12 @@ public class DefaultActivity extends Activity {
|
|||||||
|
|
||||||
TelephonyManager mTelephony = getApplicationContext().getSystemService(TelephonyManager.class);
|
TelephonyManager mTelephony = getApplicationContext().getSystemService(TelephonyManager.class);
|
||||||
mTelephony.setPreferredNetworkTypeBitmask(TelephonyManager.NETWORK_TYPE_BITMASK_NR);
|
mTelephony.setPreferredNetworkTypeBitmask(TelephonyManager.NETWORK_TYPE_BITMASK_NR);
|
||||||
|
if ("freeform".equals(displaySettingsName)) {
|
||||||
|
Settings.Global.putInt(getContentResolver(), "sf", 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_WM_DISPLAY_SETTINGS_PATH, "vendor/etc/display_settings_freeform.xml");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add network with SSID "AndroidWifi"
|
// Add network with SSID "AndroidWifi"
|
||||||
|
|||||||
Reference in New Issue
Block a user