Merge "emulator: disable setting NR as network type" am: 2f2313d01c

Original change: https://android-review.googlesource.com/c/platform/development/+/1807202

Change-Id: Ie932a37d5eedc6b3fd9d01777f0f729847bd4742
This commit is contained in:
Bo Hu
2021-08-26 17:07:23 +00:00

View File

@@ -87,8 +87,10 @@ public class DefaultActivity extends Activity {
// Disable offload wifi tethering
Settings.Global.putInt(getContentResolver(), Settings.Global.TETHER_OFFLOAD_DISABLED, 1);
TelephonyManager mTelephony = getApplicationContext().getSystemService(TelephonyManager.class);
mTelephony.setPreferredNetworkTypeBitmask(TelephonyManager.NETWORK_TYPE_BITMASK_NR);
// b/193418404
// the following blocks, TODO: find out why and fix it. disable this for now.
// TelephonyManager mTelephony = getApplicationContext().getSystemService(TelephonyManager.class);
// 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");