Merge "Use SwitchPreferenceCompat for UI consistency" into main
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2366f3b..aae8eda 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -12563,36 +12563,36 @@
<!-- Developer Settings: Search keywords for the Profile HWUI rendering. [CHAR_LIMIT=NONE] -->
<string name="track_frame_time_keywords">GPU</string>
- <!-- setting Checkbox title whether to boot with 16KB page size [CHAR_LIMIT=35] -->
- <string name="enable_16k_pages">Boot with 16KB page size</string>
- <!-- setting Checkbox summary whether to boot with 16K page size[CHAR_LIMIT=50] -->
- <string name="enable_16k_pages_summary">Boot device using 16KB page size supported kernel</string>
- <!-- Confirmation dialog title to ensure user wishes to enable 16K page size -->
- <string name="confirm_enable_16k_pages_title">Switch from 4KB mode to 16KB mode</string>
- <!-- Warning dialog message to confirm user wishes to enable 16KB page size -->
- <string name="confirm_enable_16k_pages_text">You are in the page-agnostic mode running a 4KB kernel, and you are switching to the 16KB mode.
+ <!-- setting Checkbox title whether to boot with 16 KB page size [CHAR_LIMIT=35] -->
+ <string name="enable_16k_pages">Boot with 16 KB page size</string>
+ <!-- setting Checkbox summary whether to boot with 16 KB page size[CHAR_LIMIT=50] -->
+ <string name="enable_16k_pages_summary">Boot device using 16 KB page size supported kernel</string>
+ <!-- Confirmation dialog title to ensure user wishes to enable 16 KB page size -->
+ <string name="confirm_enable_16k_pages_title">Switch from 4 KB mode to 16 KB mode</string>
+ <!-- Warning dialog message to confirm user wishes to enable 16 KB page size -->
+ <string name="confirm_enable_16k_pages_text">You are in the page-agnostic mode running a 4 KB kernel, and you are switching to the 16 KB mode.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
This will reboot the device. Some features will be disabled in these modes, so some applications may not work.
- To return the device to production mode, you would need to then, switch back to the 4KB mode and lock the bootloader,
+ To return the device to production mode, you would need to then, switch back to the 4 KB mode and lock the bootloader,
which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string>
<!-- dialog title to confirm user wishes to revert to 4k page size kernel -->
- <string name="confirm_enable_4k_pages_title">Switch from 16KB mode to 4KB mode</string>
+ <string name="confirm_enable_4k_pages_title">Switch from 16 KB mode to 4 KB mode</string>
<!-- dialog message to confirm user wishes to enable 4K page size -->
- <string name="confirm_enable_4k_pages_text">You are in the page-agnostic mode running a 16KB kernel, and you are switching to the 4KB mode.
+ <string name="confirm_enable_4k_pages_text">You are in the page-agnostic mode running a 16 KB kernel, and you are switching to the 4 KB mode.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
This will reboot the device. Some features will be disabled in these modes, so some applications may not work. To return the device to production mode,
you would need to then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.</string>
<!-- Toast message when 16k OTA update fails -->
- <string name="toast_16k_update_failed_text">Failed to update kernel to 16KB pages compatible kernel.</string>
+ <string name="toast_16k_update_failed_text">Failed to update kernel to 16 KB pages compatible kernel.</string>
<string name="progress_16k_ota_title">Applying change</string>
<!-- Confirmation dialog title and text to reformat data to ext4 -->
- <string name="confirm_format_ext4_title">Reformat device to ext4? (required for 16KB mode)</string>
- <string name="confirm_format_ext4_text">This device’s data partition needs to be converted to ext4 before using the 16KB developer option.
+ <string name="confirm_format_ext4_title">Reformat device to ext4? (required for 16 KB mode)</string>
+ <string name="confirm_format_ext4_text">This device’s data partition needs to be converted to ext4 before using the 16 KB developer option.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
- Activating the 16KB option will require one more reboot after this. Once you are in this mode, you can switch back and forth between 4KB and 16KB mode with a single reboot.
- Some features will be disabled in these modes, so some applications may not work. To return the device to production mode, you would need to switch back to 4KB mode and
+ Activating the 16 KB option will require one more reboot after this. Once you are in this mode, you can switch back and forth between 4 KB and 16 KB mode with a single reboot.
+ Some features will be disabled in these modes, so some applications may not work. To return the device to production mode, you would need to switch back to 4 KB mode and
then lock the bootloader, which factory resets the device. After the device successfully boots into Android, disable OEM unlocking in Developer options.
- The device will be wiped and the filesystem will be changed to ext4 after confirmation. After this completes, please come back to enable 16KB again.
+ The device will be wiped and the filesystem will be changed to ext4 after confirmation. After this completes, please come back to enable 16 KB again.
</string>
<!-- Text for confirmation buttion for ext4 -->
<string name="confirm_ext4_button_text">Erase all data</string>
@@ -12600,22 +12600,22 @@
<string name="format_ext4_failure_toast">Failed to reformat and wipe the data partition to ext4.</string>
<!-- Dialog to OEM unlock the device before using 16K developer option -->
<string name="confirm_oem_unlock_for_16k_title">Bootloader Unlock Required</string>
- <string name="confirm_oem_unlock_for_16k_text">This device needs to have the bootloader unlocked before using the 16KB developer option.
+ <string name="confirm_oem_unlock_for_16k_text">This device needs to have the bootloader unlocked before using the 16 KB developer option.
Software integrity cannot be guaranteed in this mode, and any data stored on the phone while the bootloader is unlocked may be at risk.
- All user data and settings will be wiped when activating 16KB mode. Once the bootloader is unlocked, activating the 16KB option will require two reboots.
- Once you are in this mode, you can switch back and forth between 4KB and 16KB mode with a single reboot. Some features will be disabled in these modes,
- so some applications may not work. To return the device to production mode, you would need to switch back to 4KB mode and then OEM/bootloader lock (which factory resets) the device.
+ All user data and settings will be wiped when activating 16 KB mode. Once the bootloader is unlocked, activating the 16 KB option will require two reboots.
+ Once you are in this mode, you can switch back and forth between 4 KB and 16 KB mode with a single reboot. Some features will be disabled in these modes,
+ so some applications may not work. To return the device to production mode, you would need to switch back to 4 KB mode and then OEM/bootloader lock (which factory resets) the device.
Please unlock the bootloader and try again. You can see instructions for how to do this at
<a href=\"https://source.android.com/docs/core/architecture/bootloader/locking_unlocking\">https://source.android.com/docs/core/architecture/bootloader/locking_unlocking</a>
</string>
<!-- persistent notification 4k page agnostic mode title -->
- <string name="page_agnostic_4k_pages_title">Using 4KB page-agnostic mode</string>
+ <string name="page_agnostic_4k_pages_title">Using 4 KB page-agnostic mode</string>
<!-- persistent notification 4k page agnostic mode text -->
- <string name="page_agnostic_4k_pages_text_short">You are in the 4KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
+ <string name="page_agnostic_4k_pages_text_short">You are in the 4 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must lock the bootloader of the device. Tap to read more.</string>
<!-- persistent notification 16k page agnostic mode title -->
- <string name="page_agnostic_4k_pages_text">You are in the 4KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
+ <string name="page_agnostic_4k_pages_text">You are in the 4 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
In order to re-enter the production mode, you must lock the bootloader of the device. This would factory reset the device again and restore it to production settings.
After the device successfully boots into Android, disable OEM unlocking in Developer options.
@@ -12624,20 +12624,20 @@
or use <a href=\"https://flash.android.com/back-to-public\">https://flash.android.com/back-to-public</a>
and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string>
<!-- persistent notification 16k page agnostic mode title -->
- <string name="page_agnostic_16k_pages_title">Using 16KB page-agnostic mode</string>
+ <string name="page_agnostic_16k_pages_title">Using 16 KB page-agnostic mode</string>
<!-- persistent notification 16k page agnostic mode text -->
- <string name="page_agnostic_16k_pages_text_short">You are in the 16KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
+ <string name="page_agnostic_16k_pages_text_short">You are in the 16 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
- In order to re-enter the production mode, you must, switch back to 4KB mode and then lock the bootloader of the device. Tap to read more.</string>
- <string name="page_agnostic_16k_pages_text">You are in the 16KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
+ In order to re-enter the production mode, you must, switch back to 4 KB mode and then lock the bootloader of the device. Tap to read more.</string>
+ <string name="page_agnostic_16k_pages_text">You are in the 16 KB mode of the page-agnostic mode. Software integrity cannot be guaranteed in this mode,
and any data stored on the phone while the bootloader is unlocked may be at risk. Some features will be disabled in these modes, so some applications may not work.
- In order to re-enter the production mode, you must, switch back to 4KB mode and then lock the bootloader of the device. This would factory reset the device again and
+ In order to re-enter the production mode, you must, switch back to 4 KB mode and then lock the bootloader of the device. This would factory reset the device again and
restore it to production settings. After the device successfully boots into Android, disable OEM unlocking in Developer options.
If the device fails to boot into Android or is unstable, re-flash the device with the latest factory images from
<a href=\"https://developers.google.com/android/images\">https://developers.google.com/android/images</a>
or use <a href=\"https://flash.android.com/back-to-public\">https://flash.android.com/back-to-public</a>
and select \'Wipe Device\', \'Lock Bootloader\' and \'Force Flash all partitions\'.</string>
- <string name="page_agnostic_notification_channel_name">16KB Page-agnostic Mode</string>
+ <string name="page_agnostic_notification_channel_name">16 KB Page-agnostic Mode</string>
<string name="page_agnostic_notification_action">Read more</string>
<!-- DSU Loader. Do not translate. -->
diff --git a/src/com/android/settings/connecteddevice/usb/OWNERS b/src/com/android/settings/connecteddevice/usb/OWNERS
index bb3b8fc..60abfeb 100644
--- a/src/com/android/settings/connecteddevice/usb/OWNERS
+++ b/src/com/android/settings/connecteddevice/usb/OWNERS
@@ -1,5 +1,4 @@
# Default reviewers for this and subdirectories.
-zhangjerry@google.com
badhri@google.com
hughchen@google.com
timhypeng@google.com
diff --git a/src/com/android/settings/datausage/OWNERS b/src/com/android/settings/datausage/OWNERS
index 1ad5b2d..acefc8d 100644
--- a/src/com/android/settings/datausage/OWNERS
+++ b/src/com/android/settings/datausage/OWNERS
@@ -1,6 +1,5 @@
# Default reviewers for this and subdirectories.
andychou@google.com
-bonianchen@google.com
changbetty@google.com
songferngwang@google.com
wengsu@google.com
diff --git a/src/com/android/settings/deviceinfo/OWNERS b/src/com/android/settings/deviceinfo/OWNERS
index 110402f..d206145 100644
--- a/src/com/android/settings/deviceinfo/OWNERS
+++ b/src/com/android/settings/deviceinfo/OWNERS
@@ -1,7 +1,6 @@
# Default reviewers for this and subdirectories.
allenwtsu@google.com
andychou@google.com
-bonianchen@google.com
songferngwang@google.com
# Emergency approvers in case the above are not available
diff --git a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarController.java b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarController.java
index 8580f6e..218e035 100644
--- a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarController.java
+++ b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarController.java
@@ -49,7 +49,7 @@
implements OnPreferenceChangeListener, OnSeekBarChangeListener {
public static final int MAX_SEEKBAR_VALUE = 15;
- public static final int MIN_SEEKBAR_VALUE = 2;
+ public static final int MIN_SEEKBAR_VALUE = 4;
public static final String KEY_BATTERY_SAVER_SEEK_BAR = "battery_saver_seek_bar";
private static final int LEVEL_UNIT_SCALE = 5;
diff --git a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
index 73f80f6..c4eaf76 100644
--- a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
+++ b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
@@ -165,6 +165,7 @@
}
final CharSequence displayName = SubscriptionUtil.getUniqueSubscriptionDisplayName(
info, getContext());
+ mNameView.setText(displayName);
if (!TextUtils.isEmpty(displayName)) {
mNameView.setSelection(Math.min(displayName.length(),
getResources().getInteger(R.integer.sim_label_max_length)));
diff --git a/src/com/android/settings/sim/OWNERS b/src/com/android/settings/sim/OWNERS
index 110402f..d206145 100644
--- a/src/com/android/settings/sim/OWNERS
+++ b/src/com/android/settings/sim/OWNERS
@@ -1,7 +1,6 @@
# Default reviewers for this and subdirectories.
allenwtsu@google.com
andychou@google.com
-bonianchen@google.com
songferngwang@google.com
# Emergency approvers in case the above are not available
diff --git a/src/com/android/settings/wifi/OWNERS b/src/com/android/settings/wifi/OWNERS
index ef870f0..acefc8d 100644
--- a/src/com/android/settings/wifi/OWNERS
+++ b/src/com/android/settings/wifi/OWNERS
@@ -1,6 +1,5 @@
# Default reviewers for this and subdirectories.
andychou@google.com
-arcwang@google.com
changbetty@google.com
songferngwang@google.com
wengsu@google.com
diff --git a/tests/Enable16KbTests/OWNERS b/tests/Enable16KbTests/OWNERS
new file mode 100644
index 0000000..b968096
--- /dev/null
+++ b/tests/Enable16KbTests/OWNERS
@@ -0,0 +1,2 @@
+smoreland@google.com
+waghpawan@google.com
\ No newline at end of file
diff --git a/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java b/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java
index 8e8dba8..75e29a1 100644
--- a/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java
+++ b/tests/Enable16KbTests/src/com/android/test/Enable16KbTest.java
@@ -48,18 +48,21 @@
private static final String SWITCH_TO_4KB = "enable16k_switchTo4Kb";
private static final String DISABLE_DEV_OPTION = "enable16k_disableDeveloperOption";
+ private static final int DEVICE_WAIT_TIMEOUT = 120000;
+ private static final int DEVICE_UPDATE_TIMEOUT = 180000;
+
@Test
@AppModeFull
public void enable16KbToggle() throws Exception {
- // Wait for 2 mins device to be online
- getDevice().waitForDeviceOnline(120000);
+ // Wait for 2 minutes for device to be online
+ prepareDevice();
if (!isPackageInstalled(APP_PACKAGE)) {
//If test app has failed for some reason, retry installation
installTestApp();
}
// Check if developer option is enabled otherwise exit
- getDevice().enableAdbRoot();
+ prepareDevice();
String result = getDevice().getProperty("ro.product.build.16k_page.enabled");
assumeTrue("true".equals(result));
@@ -72,8 +75,6 @@
// Enables developer option and switch to ext4
runTestAndWait(SWITCH_TO_EXT4);
-
- getDevice().enableAdbRoot();
getDevice().executeShellCommand("am start -a com.android.setupwizard.FOUR_CORNER_EXIT");
assertTrue(verifyExt4());
@@ -81,13 +82,11 @@
installTestApp();
// Enable developer option and switch to 16kb kernel and Check page size
- getDevice().enableAdbRoot();
runTestAndWait(SWITCH_TO_16KB);
result = getDevice().executeShellCommand("getconf PAGE_SIZE");
assertEquals("16384", result.strip());
// switch back to 4kb kernel and check page size
- getDevice().enableAdbRoot();
runTestAndWait(SWITCH_TO_4KB);
result = getDevice().executeShellCommand("getconf PAGE_SIZE");
assertEquals("4096", result.strip());
@@ -105,11 +104,23 @@
}
private void runTestAndWait(String testMethodName) throws Exception {
+ prepareDevice();
runDeviceTests(APP_PACKAGE, APP_PACKAGE + "." + TEST_NAME, testMethodName);
// Device is either formatting or applying update. It usually takes 3 minutes to boot.
- RunUtil.getDefault().sleep(180000);
- // Wait for 2 mins device to be online againg
- getDevice().waitForDeviceOnline(120000);
+ RunUtil.getDefault().sleep(DEVICE_UPDATE_TIMEOUT);
+
+ // make sure it is available again after the test
+ prepareDevice();
+ }
+
+ private void prepareDevice() throws Exception {
+ // Verify that device is online before running test and enable root
+ getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT);
+ getDevice().enableAdbRoot();
+ getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT);
+
+ getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP");
+ getDevice().executeShellCommand("wm dismiss-keyguard");
}
private boolean verifyExt4() throws Exception {
diff --git a/tests/Enable16KbTests/test_16kb_app/src/com/android/settings/development/test/Enable16KbDeviceTest.java b/tests/Enable16KbTests/test_16kb_app/src/com/android/settings/development/test/Enable16KbDeviceTest.java
index ecb3123..b84a99f 100644
--- a/tests/Enable16KbTests/test_16kb_app/src/com/android/settings/development/test/Enable16KbDeviceTest.java
+++ b/tests/Enable16KbTests/test_16kb_app/src/com/android/settings/development/test/Enable16KbDeviceTest.java
@@ -43,17 +43,17 @@
public class Enable16KbDeviceTest {
private static final long TIMEOUT = 2000;
- private static final String ENABLE_16K_TOGGLE = "Boot with 16KB page size";
+ private static final String ENABLE_16K_TOGGLE = "Boot with 16 KB page size";
private static final String BUILD_NUMBER = "Build number";
private static final String USE_DEVELOPER_OPTIONS = "Use developer options";
private static final String EXT4_CONFIRMATION = "Erase all data";
- private static final String EXT4_TITLE = "Reformat device to ext4? (required for 16KB mode)";
- private static final String TOGGLE_16K_TITLE = "Switch from 4KB mode to 16KB mode";
- private static final String TOGGLE_4K_TITLE = "Switch from 16KB mode to 4KB mode";
+ private static final String EXT4_TITLE = "Reformat device to ext4? (required for 16 KB mode)";
+ private static final String TOGGLE_16K_TITLE = "Switch from 4 KB mode to 16 KB mode";
+ private static final String TOGGLE_4K_TITLE = "Switch from 16 KB mode to 4 KB mode";
private static final String ANDROID_WIDGET_SCROLLVIEW = "android.widget.ScrollView";
private static final String OKAY = "OK";
- private static final String NOTIFICATION_TITLE_4K = "Using 4KB page-agnostic mode";
- private static final String NOTIFICATION_TITLE_16K = "Using 16KB page-agnostic mode";
+ private static final String NOTIFICATION_TITLE_4K = "Using 4 KB page-agnostic mode";
+ private static final String NOTIFICATION_TITLE_16K = "Using 16 KB page-agnostic mode";
private Context mContext;
private UiDevice mDevice;
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarControllerTest.java
index f224c8a..07e563b 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarControllerTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleSeekBarControllerTest.java
@@ -95,7 +95,7 @@
@Test
public void updateSeekBar_percentageMode_hasCorrectProperties() {
- final CharSequence expectedTitle = "10%";
+ final CharSequence expectedTitle = "20%";
Settings.Global.putInt(
mResolver,
Global.AUTOMATIC_POWER_SAVE_MODE,