Commit Graph

18999 Commits

Author SHA1 Message Date
ykhung
553baca4ce Remove EarlyWarningTip and move the logic into LowBatteryTip
Fix: 263835342
Test: presubmit
Change-Id: I256cd6f364979046ee87524751c3fe137a0524c2
2022-12-29 15:53:57 +08:00
Behnam Heydarshahi
4f87dd4b56 Implement a separate controller for ring volume
When ring volume is separated from notification, a new xml preferece and
controller is needed for it, so that the settings search can show/hide
the slice correctly.

1. Use a separate preference and controller for ring volume (vs ring &
notification combined)
2. Notification slice in settings no longer grays out when ringer mode
is set to mute or vibrate.
3. Introduce an abstract RingerModeAffected preference controller class
to factor out duplicate code among ring, notification, and separate-ring
controller classes.

Bug: b/259084354

Test:   make ROBOTEST_FILTER=RingVolumePreferenceControllerTest
RunSettingsRoboTests -j40
        make ROBOTEST_FILTER=SeparateRingVolumePreferenceControllerTest
RunSettingsRoboTests -j40
        make ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest
RunSettingsRoboTests -j40
        make ROBOTEST_FILTER=VolumePanelTest RunSettingsRoboTests -j40
	make
ROBOTEST_FILTER=RingerModeAffectedVolumePreferenceControllerTest -j40

Known Issue:
1. When streams are separate and ring volume set to mute/vibrate,
notification is set to zero, but not disabled. So it can be turned on
by user (and in settings the icon will stay mute/vibrate instead of
changing to the normal notification icon).

2. In the above scenario after notification is unmuted in settings,
the notification icon continues to stay vibrate/mute -- should change
to the normal notification icon.

Note: This feature is controlled using a boolean DeviceConfig flag:
systemui/"volume_separate_ring". The default value is 'false', which is
meant to keep the experience the same as before. It will be set to
'true' for teamfood and dogfood. Eventually the flag will be removed and
the code in the 'true' branch will prevail.


Change-Id: Ibec871eafeef4081e96c5e0dd04535565d50a077
2022-12-28 22:33:50 +00:00
Tetiana Meronyk
b389e9d551 Allow creating admin users when 'config_enableMultipleAdmins' property is enabled
Bug: 262371063
Test: manual
Change-Id: I465901a8d689239d9dda252c5d6f37ec0853b317
2022-12-28 16:46:33 +00:00
YK Hung
ea0b1a99b0 Merge "Remove the legacy EarlyWarning tip mechanism to improve performance" 2022-12-28 16:03:14 +00:00
Weng Su
29846984e7 Refine TetherSettings to avoid activity leaks
- Get system service by application context instead of fragment context to avoid the context being occupied

- Use the application main executor instead of creating new executor locally to avoid the executor being occupied

Bug: 246531382
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
atest -c TetheringHelperTest

Change-Id: I0de5e9c2bedfc8a224b3f8306224542212c9fcf5
2022-12-28 07:45:47 +00:00
Kuan Wang
1ce97c8ebe Generate app and device screen-on time data and return back to UI for
rendering.

Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: I2fd69b4686cc2e1413ad0eb43c07b6164e411411
2022-12-28 07:40:39 +00:00
ykhung
4a470d87dc Remove the legacy EarlyWarning tip mechanism to improve performance
Fix: 263835342
Test: presubmit
Change-Id: I0c3f61a21874c70b49cdeb73bbdc285ef8c4a35f
2022-12-28 15:33:19 +08:00
Bonian Chen
25b403500f [Settings] Remove EID from SimStatusDialog
Remove EID field.

Bug: 260540995
Test: local
Change-Id: I0da91b6e0f21d11aa9ba1660e759b532eb7b7c35
2022-12-28 04:58:55 +00:00
Kuan Wang
bb57a75f36 Merge "Dump app usage event data in db in BugReportContentProvider." 2022-12-28 03:08:40 +00:00
Kuan Wang
b2b74d8a8b Dump app usage event data in db in BugReportContentProvider.
Test: make RunSettingsRoboTests
Bug: 260965327
Change-Id: I9f7ac74ed53b19d6ce9be3afa3ecf2a602d6309b
2022-12-28 02:56:43 +00:00
Kuan Wang
120c68881c Generate intermediate app usage data after all usage data has been
loaded for further use.

Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: I52d96151cab112adca68573f3b47a53b7152f2c0
2022-12-28 02:56:35 +00:00
jasonwshsu
9cb33c1315 [hearing devices page] Launch 'Hearing decice controls' to Accessibility hearing device page.
Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHearingDeviceControlsControllerTest
Change-Id: I14cdc8f91f1a6212ab98081eddd15e6a1eb5db50
2022-12-28 02:35:54 +08:00
jasonwshsu
a7fd647ef7 [Hearing device shortcut] Provide a way to open accessibility hearing device settings via intent
* hearing device shortcut trigger action is to open accessibility hearing device settings. Framework needs a way to open it.

Bug: 237625815
Test: adb shell am start -a \
"android.settings.ACCESSIBILITY_DETAILS_SETTINGS" \
--es android.intent.extra.COMPONENT_NAME \
"com.android.server.accessibility/HearingAids"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityDetailsSettingsFragmentTest

Change-Id: Ie47e24d29998eac0cf4805e1ac4e7d2bcb77ed8e
2022-12-28 02:35:54 +08:00
jasonwshsu
ad6351d614 [Hearing device shortcut] Setup shortcut for hearing device
* Hearing aids page need to set restricted mode to DISALLOW_CONFIG_BLUETOOTH, so change AccessibilityShortcutPreferenceFragment to extend RestrictedDashboardFragment
* move ShortcutPreference under the device control category for the 1st order

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityShortcutPreferenceFragmentTest
Change-Id: I13da8d979694aeab76d8a10edf1348c0ee7810f6
2022-12-28 02:35:53 +08:00
ykhung
b875752307 Add isBatteryManagerSupported() to control adaptive preferences page
Add isBatteryManagerSupported() in the PowerUsageFeatureProvider to
support controlling the adaptive preferences page dynamically

Bug: 229558366
Test: presubmit
Change-Id: Iffb552feb9e08ca72f2970eb778cd3fcd18f0b7e
2022-12-27 15:31:11 +08:00
xinghailu
1637a3a10a Cleanup plurals format
Change <one> to <1> in string res file
Test: Update, existing tests still pass
bug: 199230342

Change-Id: Ic3a5259570cb52cd1664638f3b1058c87a631c04
2022-12-27 12:12:11 +08:00
Chaohui Wang
a9c624b0d3 Add SpaAppBridgeActivity for application usage
This requires the user to pass into the package name, which enabling
the feature of navigating to app info pages.

Bug: 263553430
Test: Manually with Settings
Change-Id: I9405e3732d99f78cd87e62d73b0c9519a8e2d71f
2022-12-26 20:22:38 +08:00
TreeHugger Robot
fec083b2cd Merge "[Battery usage U] Remove 'Phone Idle' to avoid confusion" 2022-12-26 02:42:50 +00:00
TreeHugger Robot
ee3c5500f6 Merge "Refine TetherSettings" 2022-12-23 07:36:55 +00:00
Bonian Chen
7d920ca2a0 Merge "Revert "[Settings] Ignore some failure test cases"" 2022-12-23 06:47:54 +00:00
Wesley Wang
cf5ef77340 Merge "Refactor battery saver schedule method" 2022-12-23 06:16:17 +00:00
XingHai Lu
7f919a3c1b Merge "Cleanup some plurals in Settings Change <one> to <1> in string res file, and update related java files. Test: Update, existing test still pass. bug: 199230342" 2022-12-23 02:34:31 +00:00
Vaibhav Devmurari
327260b3c2 Merge "Change keyboard layout parameters to include Layout type." 2022-12-22 15:58:11 +00:00
Weng Su
f077b83586 Refine TetherSettings
- Move TetherSettings to network/tether folder

- Refine unit tests

Bug: 237273138
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest

Change-Id: I1eb79780df824c575e79047bdeb3a9276f061fe9
2022-12-22 23:04:59 +08:00
Bonian Chen
1dd47d5c1d Revert "[Settings] Ignore some failure test cases"
This reverts commit c9db203edd.

Reason for revert: Try to see how many test cases can be passed.

Change-Id: I6499c6499d4f30718d18ca03e02cf1f5e4b7918e
2022-12-22 14:45:11 +00:00
Chaohui Wang
366649ed1c Merge "Set setModeByUid to align with current behavior" 2022-12-22 14:14:17 +00:00
Wesley Wang
934700b559 Refactor battery saver schedule method
- Move schedule method and definition into BatterySaverUtils and reuse
   them from utils

Bug: 260302999
Test: make SettingsRoboTests
Change-Id: I402c57629d1a6f3317f0a7c14529508ce81f999c
2022-12-22 11:45:09 +00:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Zaiyue Xue
daeafc8fc6 [Battery usage U] Remove 'Phone Idle' to avoid confusion
Bug: 252938706
Fix: 252938706
Test: manual
Change-Id: I0ad973718f77640839dbdf4ac5ca4241f01bdb79
2022-12-22 08:36:59 +08:00
TreeHugger Robot
cf9fd9941d Merge changes from topic "credManSettings"
* changes:
  Calling isServiceEnabled with the context in credential manager settings
  Revert "Revert "Add Credential Manager settings""
2022-12-21 17:32:05 +00:00
Tetiana Meronyk
e257606508 Merge "Add UI for multiple admins on Headless" 2022-12-21 17:00:48 +00:00
David Gutierrez
3595b025bc Merge "Automatic timezone support on non-telephony devices" 2022-12-21 16:40:19 +00:00
David Gutierrez
9ebb2fce7a Automatic timezone support on non-telephony devices
Adding to the Settings UI in order to simplify timezone on non-telephony devices.

Test: on-device testing, additional unit tests
Change-Id: I58ece9542a7b80823092bd082d4bd8c224b29634
Bug: 253015306
2022-12-21 16:39:32 +00:00
Vania Januar
b7855ee1b4 Merge "Stylus updater in ConnectedDevicesGroupController." 2022-12-21 11:38:53 +00:00
Tetiana Meronyk
e5acef9034 Add UI for multiple admins on Headless
In a series of CLs under topic add_ui_for_hsum_admins UI and functionality for allowing multiple admins on HSUM build is added. In User settings and User switcher when creating a new user there is a new dialog prompting to choose admin status of the user to be created. In User details view there is a toggle that is visible to admin users that allows to modify admin status of existing users. This toggle is only applicable to full users that are not supervised, guests or a main device user.

Bug: 252790451
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserDetailsSettingsTest"
Change-Id: I447dc168be30aa614aeb3f8b71ad14a7223fd7c1
2022-12-21 11:02:39 +00:00
Bonian Chen
ecbb3a2933 Merge "[Settings] Code Refactor for performance" 2022-12-21 09:43:12 +00:00
Vania Januar
dc2980d220 Stylus updater in ConnectedDevicesGroupController.
This updater is responsible for listening to USI stylus
battery usage, and bluetooth stylus connection, to determine
whether to show the USI stylus preference on the Connected devices
page.

Adds an entrypoint to the StylusUsiDetailsFragment that shows
details for USI styluses.

Bug: 250909304
Test: StylusDeviceUpdaterTest
Change-Id: I6ae6b6ef880b3b3cd7430d4d35d471b14283369f
2022-12-21 09:20:07 +00:00
Darrell Shi
77026a999c Change screensaver ctrlr to base pref ctrlr. am: 542644e83f am: 955a2f2ac3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20736682

Change-Id: I8e81f6d60d52ee6c78c0037bea9f736fb12a4c88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-21 09:04:49 +00:00
Darrell Shi
955a2f2ac3 Change screensaver ctrlr to base pref ctrlr. am: 542644e83f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20736682

Change-Id: Ic6f282087660ede4a0b1fd38378c0c5adc58bc3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-21 08:23:48 +00:00
Darrell Shi
e722587923 Merge changes from topic "hub-mode-settings" into tm-qpr-dev
* changes:
  Add top-level Communal settings.
  Change screensaver ctrlr to base pref ctrlr.
2022-12-21 08:03:49 +00:00
Chaohui Wang
35e0ff2fb7 Merge "Add AppNotificationPreference to App Info Settings" 2022-12-21 04:51:04 +00:00
Chaohui Wang
dcd965b816 Add AppNotificationPreference to App Info Settings
This is only for the App Info Settings page, which is planed to be
migrated to SPA in Android U.

Currently protected by flag settings_enable_spa, default false.

This will not impacted the AppNotificationSettings, which has no plan
to be migrated.

Bug: 236346018
Test: Unit test
Test: Manual with Settings App
Change-Id: I4ae669ce36eb6ab73f1adf99585f424e03bf90fb
2022-12-21 04:50:12 +00:00
George Chan
4f894679aa Merge "Added Background install control UI code." 2022-12-21 04:33:25 +00:00
Kuan Wang
2c7f06e9b3 Use taskRootPackageName instead of packageName to load uid when usage
resource is USAGE_SOURCE_TASK_ROOT_ACTIVITY and taskRootPackageName is
not empty.

This logic is consistent with digital wellbeing: assign the screen-on
time onto task root activity when usage resource is
USAGE_SOURCE_TASK_ROOT_ACTIVITY.

Bug: 260964679
Test: make RunSettingsRoboTests + manual
Change-Id: I4c7ed342d8c00951879f5826bf79575f330ce86e
2022-12-21 02:39:23 +00:00
Kuan Wang
a1a7cba6a6 Move the getBatteryLevelData function from DataProcessor to
DataProcessManager and start the async task in DataProcessManager when
there is no battery level data.

Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: Ie36ab6d121a5596a3abc16e7f570dd0d9b32e11c
2022-12-21 02:39:11 +00:00
PETER LIANG
0b2a23dedc Merge "Fix the display/Font preview window appears blank while transitioning between sizes." 2022-12-21 02:33:32 +00:00
Bonian Chen
af8f04c3d1 [Settings] Code Refactor for performance
Reduce number of SubscriptionManager API queries.

Bug: 260540995
Test: local and auto
Change-Id: Ib05660d9ade7f352a7cc82d4065974aec396714a
2022-12-21 01:45:40 +00:00
Vaibhav Devmurari
aa3ec01f9f Change keyboard layout parameters to include Layout type.
Test: atest KeyboardLayoutPickerControllerTest
Bug: 259530132
Change-Id: I112d2c25ca5eeacee445e247bf40a57d358e7f42
2022-12-21 00:32:21 +00:00
George Chan
d18b422c51 Added Background install control UI code.
Change-Id: I1b629fdc04d1df1b08998c9aaae3df3446fab3fe
Bug: 238451991
Test: Manually with settings, atest
2022-12-20 22:38:01 +00:00
Reema Bajwa
5ba7d67b42 Revert "Revert "Add Credential Manager settings""
This reverts commit 7a231eaba0.

Reason for revert: Adding in fix for issue that caused initial revert

Change-Id: I395c13fb46fc570a6b8a663d4b4e5537866325ce
2022-12-20 22:14:05 +00:00