Migrates to using MenuProvider instead of onCreateOptionsMenu, since the previous approach is apparently now deprecated.
Also wraps usages of requireActivity() so that we're sure the activity isn't null instead of potentially throwing an exception.
Flag: android.app.modes_ui
Bug: 346575126
Test: manually confirmed that manual DND is no longer deletable
Change-Id: I872f6054061c019db9a72028cc90cbb123a1cdce
Under charging optimization mode, use ADAPTIVE_LONGLIFE as the additional condition to check whether a device is plugged.
Bug: 349949603
Flag: EXEMPT bugfix
Test: atest SettingsRoboTests
Change-Id: Idbdfaaa1d5c54be325b6182bcda81d4282c21ba0
Instead of a the plain appearance of a EntityHeaderController, make the top icon bigger and use the same circled style as the choices in the list. Also highlight the current icon in the list as selected, even if it is the default for the mode type.
Also cleaned up controllers that don't need a ZenModesBackend to not receive it.
(Both of these changes also line up with the "new mode" fragment that is incoming).
Bug: 333901673
Bug: 326442408
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I0c9f3e34019a1a6c48658933dde545ad8d7399ae
Default value of this dev options solely depends on
enable_desktop_windowing_mode, which is intended
Toggle is shown only if DW is eligible on device
Currently this option only overrides features guarded by
enable_desktop_windowing_mode, later on it will be used to override a
few other DW features
Test: Added tests. Locally tested CUJs
Bug: 348186127
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: I1c1f946b586a5ca0440b29879925ba1a624717aa
If there is no valid intent, the automatic trigger preference is disabled.
Flag: android.app.modes_ui
Bug: 341961712
Test: manual (for Bedtime & Driving modes), ZenModeSetTriggerLinkPreferenceControllerTest
Change-Id: I673792effb3cfdcaaa7cf85adfb55a93b44dcc86
- Skip set app optimization mode to restricted if the flag disabled.
Bug: 348192536
Fix: 348192536
Test: atest
Flag: EXEMPT bug fix
Change-Id: I92d320ce1edfe9b7044afdcd058651b0d54bd6bd
Remove privacy_hub_enabled, which has been default true
Flag: NONE removing default on legacy flag
Bug: 301647969
Test: manual
Change-Id: Icaea6253298efaa3444fa4142ce42ffefd159fd5
Using the config_sms_ask_every_time_support control the askEveryTime
Bug: 349169874
Test: atest PrimarySimRepositoryTest
Flag: EXEMPT bugfix
Change-Id: Ida82ed3a6b5264f8d8c5997584e9fd27f25bf09f
- Some of the locales don't display entire text and BigTextStyle doesn't
display ellipsis for them. Removing bigText.
- Fixing strings to display 4KB
- Reduce string for bootloader unlock title
Bug: 345291007
Bug: 343893991
Bug: 343815951
Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Flag: EXEMPT bugfix
Change-Id: I3e5bf9bf70be1240cfe7d3a381bb8fef62ce2efa
This mostly continues to use the existing dialogs in settingslib (ZenDurationDialog, SettingsEnableZenModeDialog) and creates a controller to read from the settings value.
Also updates the "turn on / turn off" button to respect the preferred duration.
Flag: android.app.modes_ui
Bug: 343444249
Test: ZenModeButtonPreferenceControllerTest, ManualDurationPreferenceControllerTest
Change-Id: I2fd49a79d9a5807fefdd7ec310a6cc60d70f9bb1
Symptom: After the dock defend was triggered, the battery tips still
show "Future-Bypass" dock defend mode. It should be the "Active" dock
defend mode.
Root Cause: The original `BatteryInfo.isBatteryDefender` was implemented
by using `longlife`, due to the charging limit also reuse `longlife`
issue, we replace the implementation of `BatteryInfo.isBatteryDefender`
with HAL API call `isTempDefend` and `isDwellDefend`. However, the
dock defend also needs `longlife`, the original
`BatteryInfo.isBatteryDefender`. So the dock defend checking failed
after replacing the implementation of `BatteryInfo.isBatteryDefender`
Solution:
- Add new property isLonglife in BatteryInfo
- Replace all isBatteryDefender reference that needs isLonglife
Bug: 348563863
Test: Manual Test and robotest
Test: http://ab/I08300010291126076 (unit test)
Test: http://ab/I67800010291096764 (robo test)
Flag: EXEMPT bugfix
Change-Id: I58424927522acc29dc49261a2c24829a5b34ef85
This CL also moved some binder calls to bg thread.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostream
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 347605485
Change-Id: I1a3a3db88178a43f27cac74cf743bdb75cdfb60e
It's safe since MobileNetworkDatabase is in memory only.
Bug: 348118234
Flag: EXEMPT clean up
Test: manual - check Mobile Settings
Change-Id: I25141a87b9afb42b85d73cbcd7307b899b3f0a3b
* Keep FakeFeatureFlagsImpl.
* Use EnableFlags and DisableFlags annotation
* Switch back from `assumeTrue` to `assert` when flag is enabled or disabled.
* Remove flag rollback test.
Bug: 342830919
Change-Id: Ic9b3438f3f0e31e64d5405ed81903b352195714a