Commit Graph

18366 Commits

Author SHA1 Message Date
Chaohui Wang
afeb7496bb Remove EXTRA_USER_HANDLE from startSpaActivityForApp
Bug: 263553430
Test: Unit test
Change-Id: I6739d4518eac00cfe22905c1a6589b6e9f91a1d3
2023-01-04 16:26:04 +08:00
Zaiyue Xue
778a4b42e3 Replace battery usage breakdown list from tabs to dropdown list.
screen records:
https://drive.google.com/file/d/15VJGQ_G2KIpyFcvZsyE0iRno0WZhfjGb/view?usp=sharing&resourcekey=0-bg48BsC2b-BT_80CGlzpWg
https://drive.google.com/file/d/1RaoysytQ5oZQu8CNPhYgxqBahk3UfVbr/view?usp=sharing&resourcekey=0-Xk2J36fjYWBo6KpFTrMr4Q

Bug: 264338267
Fix: 264338267
Test: manual
Change-Id: Ic020cce711b5232adfc80272836d7c2d0250d94a
2023-01-04 16:20:47 +08:00
TreeHugger Robot
7dfe918785 Merge "Launch settings for clicking fingerprint unlock" 2023-01-04 05:55:54 +00:00
Yilin Cai
fa93f941ef Fork the Wi-Fi control setting page to SPA.
The page is located at "Apps > Special app access > Wi-Fi control".

Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.specialaccess.WifiControlAppListModelTest
Test: local device (http://screen/3a4mkuAwPJoY6rf, http://screen/4fzttXjBqcEKcXA)
Bug: 262206181
Change-Id: Ibef029e6d83849a0eb0d779e5ed6dedfc2fe4b43
2023-01-04 10:56:44 +08:00
Chaohui Wang
36903136af Fix AppDataUsagePreferenceTest#whenHasDataUsage
Fix: 264141691
Test: Unit test
Change-Id: I208f6f8f04d0ed59e31b795f5c90a64e0f76cfa3
2023-01-03 11:47:25 +08:00
Chaohui Wang
7430578af1 Merge "Add SpaAppBridgeActivity for application usage" 2023-01-03 03:06:18 +00:00
TreeHugger Robot
2451afc0df Merge "Refine TetherSettings to avoid activity leaks" 2022-12-30 16:41:19 +00:00
Vania Januar
3dcceea28f Merge "Set title for Bluetooth Details page to "Stylus" for styluses." 2022-12-30 09:32:43 +00:00
Tom Hsu
94cd62ff00 Merge "[Regional Preference] Add each option entry" 2022-12-30 03:20:13 +00:00
XingHai Lu
df1fc7e0fa Merge "Cleanup plurals format Change <one> to <1> in string res file Test: Update, existing tests still pass bug: 199230342" 2022-12-30 02:44:25 +00:00
Milton Wu
160661dc6d Launch settings for clicking fingerprint unlock
Launch FingerprintSettings directly when user clicks "Fingerprint
Unlock". Let Fingerprint settings peform confirmLock() or chooseLock().
And to have smoothly animation, instead of generating challenge in
FingerprintSettings::onActivityResult(), challenge is generated in next
visible activity, and pass it back through next activity result.

Bug: 197717071
Test: atest GatekeeperPasswordProviderTest CredentialModelTest
Test: atest AutoCredentialViewModelTest FingerprintStatusUtilsTest
Test: RunSettingsRoboTests2 FingerprintEnrollIntroductionTest
Test: Manually test fingerprint enroll in settings or suw
Change-Id: Ie27c3c493ea475f6b53cb6bb3f2d45d555f47cb3
2022-12-30 10:01:06 +08:00
TreeHugger Robot
ca0ff60d63 Merge "Fix the end-icon missing issue for Wi-Fi networks" 2022-12-30 01:29:29 +00:00
Weng Su
fbe02cd543 Fix the end-icon missing issue for Wi-Fi networks
- Because WifiEntryPreference needs to support policy transparency, the inherited class is changed from Preference to RestrictedPreference.

- The RestrictedPreference will hides the end icon as default, causing this issue to happen.

- Override the getSecondTargetResId() function with necessary resource id to avoid the end-icon being hidden.

- Remove the redundant setWidgetLayoutResource, because it will be initialized in the extended class.

Bug: 262456749
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest

Change-Id: Ie3d3a649d3137dc705d7887c8e74592437d9ce61
2022-12-30 05:06:54 +08:00
Vania Januar
8811c177ea Merge "Pass CachedBluetoothDevice into StylusDevicesController." 2022-12-29 14:55:56 +00:00
tom hsu
504a5dda43 [Regional Preference] Add each option entry
- Add a entry in langauge and input page
 - Add new page for the options of Temperature unit, calendar type,
   first day of week, and numbering system.

Bug: b/246929960
Test: atest pass
Test: Manual test pass
Change-Id: I69377fe9cd6dcd7a27c933a8dc98483df3da7665
2022-12-29 21:54:21 +08:00
Vania Januar
b837d57b02 Set title for Bluetooth Details page to "Stylus" for styluses.
Bug: 254835745
Test: BluetoothDeviceDetailsFragmentTest
Change-Id: I725877b0bcf44fa7be805e16fb2d695c9d6074dc
2022-12-29 12:31:59 +00:00
Bonian Chen
2c84a3ba8c Merge "[Settings] Remove EID from SimStatusDialog" 2022-12-29 12:31:49 +00:00
Vania Januar
57822a67a8 Pass CachedBluetoothDevice into StylusDevicesController.
Styluses can now be identified using the newly added DEVICE_TYPE_STYLUS
metadata.

Bug: 251200056
Test: StylusDevicesControllerTest
Change-Id: Ie89f6419cd16ed97299944b35497c6b2ee764dab
2022-12-29 12:31:31 +00:00
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