Commit Graph

19388 Commits

Author SHA1 Message Date
Hao Dong
755a67a931 Set EXTRA_KEY_FOR_FINGERPRINT for choose lock screen.
Bug: 279823572
Test: atest FingerprintSettingsFragmentTest
Test: atest ChooseLockGenericTest
Change-Id: Ie4bc18bf245eb7a755862401c710d85381063ff9
Merged-In: Ie4bc18bf245eb7a755862401c710d85381063ff9
2023-05-10 23:26:02 +00:00
tom hsu
0617631408 [Settings] Avoid NPE if BT device is changed by framework.
- Do not register only one BT device for primary to avoid primary
   BT devcie change to another.
 - Register and unregister all BT devices

Bug: 280236099
Test: atest passed
Change-Id: I610144c7f8f649e40d99cf1dc7f50d1f3b80f109
2023-05-11 02:53:19 +08:00
Treehugger Robot
6a06cdd1bf Merge "Fix mistake in test" into udc-dev 2023-05-10 15:59:23 +00:00
Treehugger Robot
d865ccc2ed Merge "Refine optimize page log pattern" into udc-dev 2023-05-10 11:38:38 +00:00
YK Hung
2aff060aca Merge "Remove the legacy smart battery tip from Settings" into udc-dev 2023-05-10 11:19:28 +00:00
Treehugger Robot
7a7193c865 Merge "Hide carrier service package in Wi-Fi data usage settings" into udc-dev 2023-05-10 10:59:27 +00:00
Wesley Wang
1f78ebd8aa Refine optimize page log pattern
- Add timestamp and prefix string
 - Chagne Action.MANUAL to LEAVE for better readability
 screenshot: https://screenshot.googleplex.com/ALTvMaPWVEq8y7c.png

Bug: 192523697
Test: make SettingsRoboTests
Change-Id: I69d1beceb98444d823f6ffc3a015cf61a7d7a66d
2023-05-10 10:11:28 +00:00
ykhung
2f42eb20f3 Remove the legacy smart battery tip from Settings
Remove the legacy smart battery tip from the battery settings, which
will remind users to eanble the "adaptive battery" if users disable it.

Reasons: 1) 98% users will always keep the AB is enabled, and 2) we move
the AB into the battery saver page, there is no individual page anymore

Fix: 281798483
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.batterytip.*
Change-Id: I85739b88ee9373b95a62271d2eb0137cf411d8cb
2023-05-10 09:48:55 +00:00
Weng Su
f65c4530e4 Hide carrier service package in Wi-Fi data usage settings
- When there is no specified SubscriptionInfo, Wi-Fi data usage will be displayed. In this case, the carrier service package also needs to be hidden.

- Fix failing test cases in DataUsageListTest

Bug: 273167633
Bug: 280021214
Test: manual test

Change-Id: I66ff8a28d9e7f7db77c8a210cb36676a07fc2c7d
2023-05-10 17:30:01 +08:00
Bill Lin
4d5063ffdc Merge "Refine SkipDialog title and desc by device configs" into udc-dev 2023-05-09 23:09:38 +00:00
Florian Mayer
8512191c33 Fix mistake in test
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER=DevelopmentMemtagPageTest
Bug: 280021647
Change-Id: I74aa8764933d2abe9ae9dfd47c9f010411a3efee
2023-05-09 12:25:20 -07:00
Peter Zhang
3e498ad30d Render an additional icon to the tappable tiles with pending intents
Test: robotest, manual
Bug: 281517110
Change-Id: Ia5fbae63d56a6f1e6ee8fb3ee58ae912d14b6c75
2023-05-09 19:49:57 +02:00
Peter Zhang
ddb65e569b Expand SettingsLib ProviderTile to support non-switch type of Preferences
- Added new metadata allowing to set PendingIntent onto a Tile, which will be executed on click;
- Update the rendering logic to render with SwitchPreference only when Tile.hasSwitch() == true.

Test: robotest, manual
Bug: 281517110
Change-Id: I1253029be1e172792679f80be24bd58e368b9e73
2023-05-09 19:32:26 +02:00
Derek Jedral
9c67ee1eb1 Merge "Remove feature flag for active unlock" into udc-dev 2023-05-09 17:17:11 +00:00
Angela Wang
53a8cc0326 Disabled state UI of Flash Notifications preview button
When both the camera flash and screen flash toggles are turned off, tapping on the preview button will have no effect and may confuse users. To avoid this, the appearance of the preview button should be updated to clearly indicated that its current state is disabled. This wil help users better understand the situation and prevent confusion.

Bug: 276494146
Test: checks the UI manually
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FlashNotificationsPreviewPreferenceTest
Change-Id: I55b11188fde6e551921a9b0f7c89daa20a8b766b
2023-05-09 16:48:35 +00:00
lbill
67d6dff7cc Refine SkipDialog title and desc by device configs
1. Wrap isFaceSupportedInSUW() in Settings Utils
2. Wrap getCombinedScreenLockOptions in Settings Utils
3. Add EXTRA_KEY_FOR_SUW to judge if in SUW flow
4. Refactor SetupSkipDialog by hasFace, hasFingerprint,
   isSuw, isFaceSupported conditions
5. Clean up the mapping logic of SetupSkipDialog
6. Replace bools with @LockPatternUtils.CredentialType
7. Refine the logic for isFaceSupported
   ---------------------------------------
   Config |SuwSupportFace|!SuwSupportFace|
    isSuw |    true      |      false    |
   !isSuw |   hasFace    |     hasFace   |

Bug: 263070591
Bug: 279389803
Bug: 279195215
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW(workprofile), post-SUW
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Test: m RunSettingsRoboTests ROBOTEST_FILTER=SetupSkipDialogTest
Change-Id: Ie7af4299695dc3983b4190929b4dd659c301c082
2023-05-09 09:55:52 +00:00
Vincent Wang
5801e98d7f Merge "Test Fix SettingRobolectricTest Fail" into udc-dev 2023-05-09 09:50:50 +00:00
Chaohui Wang
1cc7d75d91 Merge changes I07d964b9,Ifa5928e1 into udc-dev
* changes:
  Fix flicker in SIM card page
  Clean up DefaultSubscriptionController.getSummary
2023-05-09 09:02:19 +00:00
Vincent Wang
818f77cd1f Test Fix SettingRobolectricTest Fail
Bug: b/275023433
Test: NA
Change-Id: If2dcb8f6c196327129ccc9375b190e394c994efa
2023-05-09 06:26:39 +00:00
Sunny Shao
aeb42d1438 Fix the UI in the left side & right side inconsistent problem
- Let the homepage show "Network & Internet" item in demo mode on large screen device.

Fixes: 276157240
Test: atest TopLevelNetworkEntryPreferenceControllerTest
Change-Id: Ife8bce28e6bc47caf3f06b1027579ea0e52172a3
2023-05-09 09:39:36 +08:00
Derek Jedral
501f3635dc Remove feature flag for active unlock
Active Unlock was guarded behind a feature flag for two main purposes.
1) To select the unlock intent or biometric failure layout. We've
   settled on unlock intent, so we no longer need the biometric failure
   codepath.
2) To guard the feature rollout. However, the additional platform guard
   is not necessary, since this feature availability is still guarded
   based on whether the secure settings are flipped to valid targets.
In order to keep the scope of this CL small, useBiometricFailureLayout
always returns false. Another CL will clean up all areas where it and
useUnlockIntentLayout are referenced.

Test: make RunSettingsRoboTests
Bug: b/280306741
Change-Id: I331afe9654b72249d461007c087e7f81783d7625
2023-05-08 12:46:36 -07:00
Derek Jedral
42deb763e0 Merge "Change preference title if Active Unlock enabled" into udc-dev 2023-05-08 17:56:32 +00:00
Chaohui Wang
2901125674 Fix flicker in SIM card page
Before fix, the DefaultSubscriptionController will set an empty summary
before data is ready.

Not set the summary before data is ready to fix.

Also fix the ignored tests.

Fix: 277301125
Test: Manual on Mobile Settings
Test: Unit test
Change-Id: I07d964b9f9ce21f8f168cb775eea188e48172c5d
2023-05-08 19:07:28 +08:00
Chaohui Wang
ab8a130674 Clean up DefaultSubscriptionController.getSummary
Which is always overridden by subclass after Change
I7d29b58ca5476ae0bb6fe2e04fecb96164cb1ada

This is a no op.

Bug: 277301125
Test: Manually with Mobile Settings
Test: Unit test
Change-Id: Ifa5928e1026b18c33f2bdd51fdcba267249dcee5
2023-05-08 18:56:06 +08:00
Treehugger Robot
fb1cebd7f9 Merge "Fix the updateDialogForCdmaPhone test case failed" into udc-dev 2023-05-08 10:25:06 +00:00
Sunny Shao
b723c4f96a Fix the updateDialogForCdmaPhone test case failed
- This is a side effect of the CL(ag/16379105) which removed the getTextAsDigits API.
- Update the return value as empty string of the TelephonyManager.getImei().

Fixes: 215071948
Test: atest ImeiInfoDialogControllerTest
Change-Id: I790b5dc505ad1a91a951a4c46b241baddea392a1
2023-05-08 14:01:23 +08:00
Jack He
2605ccbcfa Merge changes from topic "LeAudioBeta" into udc-dev
* changes:
  Hide the LE audio toggle by flag
  Add toggle to show/hide the Per Device Enable LE Audio Toggle in Device details
2023-05-06 00:42:40 +00:00
Chaohui Wang
5b18837a49 Merge "Fix dialog leak in RequestPermissionActivity" into udc-dev 2023-05-05 11:32:13 +00:00
Chaohui Wang
39bf7dd530 Fix dialog leak in RequestPermissionActivity
Dialog still show when activity destroyed will cause leak.

Dismiss dialog when activity onDestroy to fix this issue.

Fix: 279522922
Test: Manually with "Don't keep activities"
Test: Robolectric Test
Change-Id: I445f4b160020823a6f6e2883055218c1224e2c48
2023-05-05 17:30:02 +08:00
Chaohui Wang
7c042f374b Merge "FRP bypass defense in the Settings App for SPA" into udc-dev 2023-05-05 07:57:39 +00:00
Daniel Huang
08b2b68e22 Merge "[Fixed] Reverse scrolling setting is reversed" into udc-dev 2023-05-05 02:33:13 +00:00
TreeHugger Robot
3a2b8e81e5 Merge "[Settings] Remove WFC enabled state condition of querying Telecomm." into udc-dev 2023-05-04 14:57:36 +00:00
Treehugger Robot
54de6fd80b Merge "Support incompatible charger state in the battery main page" into udc-dev 2023-05-04 08:28:57 +00:00
Chaohui Wang
678b1d5fa4 Merge "Fix SettingsDumpServiceTest" into udc-dev 2023-05-04 07:39:14 +00:00
Hao Dong
1c9288fa24 Merge "Call onFaceStrengthChanged() only when authenticators registered." into udc-dev 2023-05-04 07:00:40 +00:00
Hao Dong
6e8434b793 Call onFaceStrengthChanged() only when authenticators registered.
Test: atest FaceEnrollIntroductionTest
Test: manually tested face enroll introduction page
Bug: 280384533
Change-Id: Iac9506d8430459aa399ac8efd3f41cbc6e67260d
Merged-In: Iac9506d8430459aa399ac8efd3f41cbc6e67260d
2023-05-04 06:59:53 +00:00
ykhung
c234196bc1 Support incompatible charger state in the battery main page
https://screenshot.googleplex.com/PrSzAtMAhsyqbsR

Bug: 271775549
Test: make test RunSettingsRoboTests
Change-Id: I0bb912eaab9c8837eaa3a9b998b3ebb5a8e6f99f
2023-05-04 14:57:07 +08:00
Chaohui Wang
e2b9d0680e Fix SettingsDumpServiceTest
SettingsDumpService behavior changed in
Change I9d7fe2e763b9e5840ee76c5eb00bc88288e7ee41

After behavior changed, PrintWriter was wrapped in IndentingPrintWriter,
it's harder to mock the PrintWriter, so check the result directly.

Fix: 280068083
Test: RobolectricTest
Change-Id: I92a7b931c93df4cd9e9c3e47b91a9750df936f15
2023-05-04 14:20:33 +08:00
Tom Hsu
99e03458fa Merge "[Settings] Fix NPE from updating subinfo changed." into udc-dev 2023-05-04 04:21:51 +00:00
Treehugger Robot
e71643efac Merge "Fix testNonIndexableKeys_existInXmlLayout" into udc-dev 2023-05-04 03:15:40 +00:00
Derek Jedral
5a75cd54d4 Change preference title if Active Unlock enabled
Change the title of the preference to reflect that Active Unlock can
also be used to unlock the device.

Test: make RunSettingsRoboTests
Bug: b/271782800
Change-Id: Ie227e6dddfc024235fc3568899ef151f14f17696
2023-05-03 12:37:01 -07:00
Patty Huang
f05615f1e8 Add toggle to show/hide the Per Device Enable LE Audio Toggle in Device details
Bug: 280020008
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Change-Id: I559f34f2b0764c4f566fe1e0c1357929e2c88fb6
2023-05-04 01:26:15 +08:00
Becca Hughes
21733fa106 Merge "Align settings with new mocks" into udc-dev 2023-05-03 16:14:12 +00:00
danielwbhuang
0b79c92348 [Fixed] Reverse scrolling setting is reversed
If useTouchpadNaturalScrolling is false, "Reverse scrolling" should be on.

[The API value]
useTouchpadNaturalScrolling: false

[The expected UX behavior]
Reverse scrolling: on
fingers upward, scroll up, content moves down

The description of "useTouchpadNaturalScrolling":
Returns true if moving two fingers upwards on the touchpad should scroll down, which is known as natural scrolling.

The description of "Reverse scrolling":
Content moves up when you scroll down.

Bug: 280047007
Test: manual and passed atest TrackpadReverseScrollingPreferenceControllerTest
Change-Id: Ia5e30fa14b599ddcffae99005114f10412ccad3c
2023-05-03 23:59:55 +08:00
danielwbhuang
bd2d0de0b3 Fix testNonIndexableKeys_existInXmlLayout
This test is for LanguageAndInputSettings UI.
Hence, we should set flag "SETTINGS_NEW_KEYBOARD_UI" to false

Bug: 280018738
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER=LanguageAndInputSettingsTest
Change-Id: Ida91a23bb576c81f9618406d54c1d892b23eb4fa
2023-05-03 20:40:53 +08:00
Treehugger Robot
8060347ec6 Merge "Reducing slice requesting logging" into udc-dev 2023-05-03 10:37:24 +00:00
Edgar Wang
fae664c79c Reducing slice requesting logging
Bug: 253684322
Test: rebuild
Change-Id: If0e884875e09bd43b88f6b5f205ad450de488552
2023-05-03 17:04:38 +08:00
Vania Januar
e78b1f377e Merge "Guard against null input device in StylusDeviceUpdater" into udc-dev 2023-05-03 09:00:56 +00:00
Chaohui Wang
80462c370b FRP bypass defense in the Settings App for SPA
Over the last few years, there have been a number of
Factory Reset Protection bypass bugs in the SUW flow.
It's unlikely to defense all points from individual apps.

Therefore, we decide to block some critical pages when
user doesn't complete the SUW flow.

Fix: 280154358
Test: Unit test
Change-Id: I06e73386711d5ad13c89d033cf0fe3164781c0ef
2023-05-03 10:53:27 +08:00
Becca Hughes
b21df6c5fc Align settings with new mocks
Test: ondevice
Bug: 278919696
Change-Id: I274126bce3616596c4a81dd3385f0844d8bdbf71
2023-05-02 23:50:22 +00:00