Commit Graph

13838 Commits

Author SHA1 Message Date
TreeHugger Robot
ee21072a5e Merge "Restrict Wi-Fi configuration if settings UI is restricted" into tm-qpr-dev 2022-09-28 16:48:10 +00:00
Weng Su
6629b12a08 Restrict Wi-Fi configuration if settings UI is restricted
- Don't launch W-Fi configuration settings if the settings UI is restricted (including guest users).

Bug: 246301667
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Merged-In: Id82498f41765f955e01bb311bb221d26f9574f31
Change-Id: Id82498f41765f955e01bb311bb221d26f9574f31
(cherry picked from commit aaa65fc6f0)
2022-09-27 14:31:09 +00:00
Ats Jenk
618876c6c9 Add support to hide developer tile based on a flag
Define new meta-data option for development tiles that can be used to
specify a sysprop flag.
If this meta-data is present, the value will be used as the flag name
that has to be enabled for the preference to show up.

Bug: 248363970
Test: atest SettingsRoboTests:DevelopmentTilePreferenceControllerTest
Change-Id: I66d56777a6290d7fee739492bd2871f637791d75
2022-09-22 19:31:47 -07:00
Jason Hsu
9ac1712145 Merge "Fix not on the top when entering device detail page" into tm-qpr-dev 2022-09-22 07:37:28 +00:00
Bill Lin
a46b426bcf Merge "Apply dark light theme for enrollment activities" into tm-qpr-dev 2022-09-22 01:55:59 +00:00
jasonwshsu
35e20d5ace Fix not on the top when entering device detail page
Root Cause: Added SpacePreference in xml let the page renders order
incorrectly.

Solution: That SpacePreference should only be visible when the device is
hearing aid.

Bug: 245681095
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Merged-In: Ic0be940c8466b5e1e301255868c29d06bd4428bd
Merged-In: I442445a861898258a73f37ad8f85bcee387fbf58
Change-Id: Icca48d9c2643507638b2b581d052530521cce5df
2022-09-21 23:54:15 +08:00
Daniel Sandler
e43bf3cd9d Merge "Launch the platform easter egg in a new task." into tm-qpr-dev 2022-09-21 14:11:57 +00:00
Dan Sandler
5eeb6c3792 Launch the platform easter egg in a new task.
This ensures that when PlatLogoActivity is launched on a
large-screen device, it properly takes over the full screen
(and doesn't hide the status bar for Settings!).

Bug: 243407943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FirmwareVersionDetailPreferenceControllerTest
Change-Id: Icf10aa43e5b4a27a2fa98ea41b5a9e9cf659e895
2022-09-20 20:10:17 -04:00
Kuan Wang
bd9042c47f Show app list in Battery Usage page when there is no battery level data.
https://drive.google.com/file/d/1iQxKmEp_weNYdT4JnsiZgYy9mCdn7SRv/view?usp=sharing

Bug: 246233366
Test: make RunSettingsRoboTests + manually
Change-Id: If536c93652506c8009f5cabf3d0ae373b6825bfc
Merged-In: If536c93652506c8009f5cabf3d0ae373b6825bfc
2022-09-20 12:11:25 +08:00
lbill
fd269d08ec Apply dark light theme for enrollment activities
Override onApplyThemeResource() and apply SetupWizardPartnerResource
to make the dark light theme activate.

Theme change scope:
1) FingerprintEnrollEnrolling
2) FingerprintEnrollFindSensor
3) SetupFingerprintEnrollEnrolling
4) SetupFingerprintEnrollFindSensor

Bug: 245684949
Test: manual in SUW `adb shell cmd uimode night yes` and check visual
Test: manual in SUW enrolling check timeout dialog apply theme
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollEnrollingTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollFindSensorTest
Change-Id: I16f1070612e3e27546e6aa004fc4cdd3d7947191
2022-09-20 01:30:28 +00:00
TreeHugger Robot
74a748ece8 Merge "Show greyed out icon when Wi-Fi network is restricted to configurate" into tm-qpr-dev 2022-09-19 03:52:34 +00:00
Weng Su
3499db23ff Show greyed out icon when Wi-Fi network is restricted to configurate
- Use Drawable#setTintList() instead of Drawable#setTint() to show greyed out icon when the preference is disabled.

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

Change-Id: I451106530bc19bc733fd58a57e8ac336b023e65e
2022-09-19 02:22:47 +08:00
Hugh Chen
bdfd8531a9 Add Spatial audio settings for LE Audio devices
- Adds TYPE_BLE_HEADSE, TYPE_BLE_SPEAKER and TYPE_BLE_BROADCAST for
  display Le audio devices.
- Adds TYPE_HEARING_AID for display hearing aid devices.

Bug: 244528781
Test: make -j64 RunSettingsRoboTests
Change-Id: I1278a5e0c93fdc5a4873df68032128ffedfe72d6
Merged-In: I1278a5e0c93fdc5a4873df68032128ffedfe72d6
(cherry picked from commit f8704add51)
2022-09-16 15:51:15 +00:00
Zaiyue Xue
9b24df2c38 Merge changes from topic "accessibility1" into tm-qpr-dev
* changes:
  Support accessibility for battery chart (4)
  Support accessibility for battery chart (3)
  Support accessibility for battery chart (2)
  Support accessibility for battery chart (1)
2022-09-14 05:46:17 +00:00
Kuan Wang
676bcedb85 Add logging for count of shown / hidden apps in Battery Usage page.
Bug: 245455490
Test: manually
Change-Id: I7342e822f00f9a0aedcef592cae9809251518812
2022-09-14 02:09:16 +00:00
Zaiyue Xue
79311805b6 Support accessibility for battery chart (3)
Support accessibilty read out full timestamp labels instead of the short one, e.g "Sunday" instead of "Sun".

Bug: 242989585
Test: manual
Change-Id: Ica2176ef3f07849d278327b9301f8c318782c2d5
2022-09-13 14:43:20 +08:00
Zaiyue Xue
9c962b03e9 Support accessibility for battery chart (1)
Remove the logic of disabling clickable when accessability is on in battery chartview.

Bug: 242989585
Test: manual
Change-Id: I92ce0ff5aac5220d686d600dbdf1d5738fe2c385
Merged-In: I92ce0ff5aac5220d686d600dbdf1d5738fe2c385
2022-09-13 14:21:01 +08:00
Rambo Wang
31cd5304ab Merge "Support AIDL IDumpstateDevice service in verbose vendor logging" into tm-qpr-dev 2022-09-08 21:57:11 +00:00
Rambo Wang
c9292dc792 Support AIDL IDumpstateDevice service in verbose vendor logging
IDumpstateDevice HAL switched to AIDL service in P22 devices.
This change will firstly apply to AIDL service if available and
fall back to HIDL service if not, making the feature work for
both HIDL an AIDL based devices.

Bug: 242634531
Test: make && make RunSettingsRoboTests
Change-Id: I4a2ec44092804574a60113e5be3df19b586bfa64
Merged-In: I4a2ec44092804574a60113e5be3df19b586bfa64
(cherry picked from commit 17a9fb6bec)
2022-09-08 05:29:10 +00:00
Menghan Li
299057e294 Merge "Fix extra dim turns on failed in setting search bar" into tm-qpr-dev 2022-09-08 02:02:26 +00:00
Bill Lin
b9263732ee Merge "Fix regression of pressing power key cancel sfps enrollment" into tm-qpr-dev 2022-09-08 00:59:09 +00:00
menghanli
aaee157fdd Fix extra dim turns on failed in setting search bar
Root cause: Don't call displayPreference before setChecked called.
Solution: Don't show quick settings tooltips if preference is not ready.

Bug: 237850687
Bug: 244676175
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest
Change-Id: I52425190cce4ab3cf31be025a743bf8b212fa1f9
Merged-In: I52425190cce4ab3cf31be025a743bf8b212fa1f9
2022-09-08 07:44:17 +08:00
lbill
82a42834b1 Fix regression of pressing power key cancel sfps enrollment
Previous ag/19699461 used to fix UdfpsControllerOverlay bug.
However, we didn't consider a feature click power button to
notify user with a Toast on sfps project.

Bug: 245383975
Bug: 228261883
Bug: 242478941
Bug: 227905887
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FingerprintEnrollEnrollingTest
Test: manual verify sfps enrollment, press/long press power key would
not cancel enrollment.
Test: manual verify udfps enrollment, UdfpsControllerOverlay lose focus
cancel enrollment.

Change-Id: I44394bdb91660b27a704064a7f7cdc5d0ad95d30
2022-09-07 04:01:40 +00:00
TreeHugger Robot
9f1dba6017 Merge "Fix Incorrect Trust Agent Count" into tm-qpr-dev 2022-09-06 18:29:43 +00:00
TreeHugger Robot
06cc4ed4ab Merge "Hide toggle to Turn on Wi-Fi automatically preference in Search settings" into tm-qpr-dev 2022-09-05 07:51:36 +00:00
Weng Su
f49c24cb82 Hide toggle to Turn on Wi-Fi automatically preference in Search settings
- If the location setting is enabled, keep the current design. that the user can switch the toggle directly in the search settings to the "Turn on Wi-Fi automatically" toggle preference.

- If the location setting is disabled, hide the switch toggle to "Turn on Wi-Fi automatically" preference to avoid unexpected behavior.

- The user can click the "Turn on Wi-Fi automatically" preference to jump to the Network preference settings, and see a reminder message in the summary to enable the location settings first before switching the toggle.

- Move the check for mFragment to a suitable location to avoid unnecessary checks.

Bug: 235421460
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiWakeupPreferenceControllerTest

Change-Id: Ib2c6b90308606d32179334d13be91e308971084f
Merged-In: Ib2c6b90308606d32179334d13be91e308971084f
(cherry picked from commit 59403ef3f2)
2022-09-02 18:36:00 +00:00
YK Hung
8bf872331b Merge "Update defend tips card" into tm-qpr-dev 2022-09-02 15:18:50 +00:00
TreeHugger Robot
0f1f02693e Merge "Update the timestamp label into uppercase and increase vertical offset" into tm-qpr-dev 2022-09-01 06:35:09 +00:00
Wesley
243b450428 Update defend tips card
- Update defend tips card to unclickable
 - Update secondary button's action and content description
 screenshot: https://screenshot.googleplex.com/BYU8Mh5abJ9Tirh.png

Bug: 243769797
Bug: 243641857
Bug: 244219076
Test: make SettingsRoboTests
Change-Id: I7fdf5f7404d33f0374a992c83a7653a01b9f11bc
2022-09-01 04:09:31 +00:00
Grace Cheng
4a187e15d6 Implement SFPS guided enrollment for T6
Reduces perception of long enrollment process by introducing new enrollment layout and stages for SFPS. Also adds user feedback via new animated assets with dynamic colors, and all associated strings and a11y labels.

Test: Observe new guided enrollment process on T6
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FingerprintEnrollEnrollingTest
Fixes: 232024488
Fixes: 233091341
Fixes: 241165082
Fixes: 242218240
Fixes: 243813773
Change-Id: I1fa0b9349545586919eceeb9d05f365c2f2ec491
Merged-In: I1fa0b9349545586919eceeb9d05f365c2f2ec491
2022-09-01 00:47:22 +00:00
ykhung
352e3a091d Update the timestamp label into uppercase and increase vertical offset
Update the timestamp label into uppercase based on the different locale
and increase the vertical offset from UX review feedback

Test: presubmit
Change-Id: Ie5e86967e36773f1f8c4f628501514b1a7fd22f5
2022-08-31 11:03:26 +08:00
Derek Jedral
6fec2be00d Fix Incorrect Trust Agent Count
The total number of trustagents can still be incorrect if the user
enables a trustagent, and then the trust agent component gets disabled,
since the user does not manually toggle the preference themselves. Fixed
by switching back to the original method of using TrustAgentManager, but
also pass a flag that allows us to choose on whether we want to filter
the trustagents based on whether it has an activity (which not all
trustagents are guaranteed to have).

Bug: 240969157
Test: Local test + atest
Change-Id: I5106859f61ddf36c1bf008da18be889ceaf27a8d
2022-08-30 17:43:11 +00:00
Bill Lin
7d15cb501f Merge "Cancel UDFPS enrollment on overlay focus loss" into tm-qpr-dev 2022-08-30 12:06:47 +00:00
Milton Wu
af5a7d8dc0 Bypass cancel error code during "Add another"
1. When user chooses "Add another" on latest fingerprint enroll page, we
   shall bypass RESULT_CANCELED from FingerprintEnrollEnrolling. This is
   because user has successfully enrolled a fingerprint before enter
   FingerprintEnrollFinish page.

2. In FingerprintEnrollFindSensor
   A. Do not call startLookingForFingerprint() if mNextClick is true
      because it is wating the result back from
      FingerprintEnrollEnrolling, and let onActivityResult() mehtod to
      handle correct behavior.
   B. Add tests for following cases
      a. Sidecar existence
      b. Activity recycled and recreate in order to get activity result.

Bug: 243701933
Bug: 243762418

Test: ROBOTEST for SetupFingerprintEnrollFindSensorTest,
   FingerprintEnrollFindSensorTest, SetupFingerprintEnrollFinishTest

Test: Test scenarios w/ and w/o always_finish_activities
  1. Enroll a fingerprint but cancel it during enrolling in SuW
  2. Enroll a fingerprint in SuW
  3. Add another fingerprint in SuW
  4. Run "Add another" but cancel it during enrolling in SuW
  5. W/o enrolled fingerprint, add first fingerprint in settings
  6. W/o enrolled fingerprint, add first fingerprint but cancel it
     during enrolling in settings
  7. W/o enrolled fingerprint, add first fingerprint and choose "Add
     another" in settings
  8. W/o enrolled fingerprint, add first fingerprint and choose "Add
     another" then cancel it during enrolling in settings
  9. W/ 1 enrolled fingerprint, add fingerprint in settings
  10. W/ 1 enrolled fingerprint, add fingerprint but cancel it during
      enrolling in settings
  11. W/ 1 enrolled fingerprint, add fingerprint and choose "Add
      another" in settings
  12. W/ 1 enrolled fingerprint, add fingerprint and choose "Add
      another" then canel it during enrolling in settings

Change-Id: I03d8d8ebc39eb34f8fc28acb5cd267e37c7a0311
2022-08-29 07:22:45 +00:00
Milton Wu
d3a1f700ee Fix udfps fingerprint setting flow
1. on udfps + faceunlock devices, fingerprint settings shall not be
   launched if no fingerprint enrolled.
2. on udfps device, after first fingerprint enrollment successfully,
   fingerprint settings shall be shown.
3. Update FingerprintEnrollFindSensorTest to support udfps cases.

Bug: 243701933
Bug: 243003012
Test: manully adding first fingerprint on udfps + faceunlock device
Test: manully suw on udfps + faceunlock device
Test: run robotest for FingerprintEnrollFindSensorTest
      and SetupFingerprintEnrollFindSensorTest

Merged-In: I62d945f2c2e980edf2a885234e54acae109e7672
Change-Id: I62d945f2c2e980edf2a885234e54acae109e7672
(cherry picked from commit 936dd31312)
2022-08-29 07:22:40 +00:00
Milton Wu
561a68db20 Use setting as base activity for fingerprint
Change to use FingerprintSetting as base activity when use launch
"Fingerprint Unlock" from Settings -> Security. And then we can prevent
that necesssary pop-up activites become full-screen.

Bug: 243701933
Bug: 232874879

Test: manual test following cases on fp-only devices, and enable don't
      keep activity and test them again.
      1. fp enrollment on SUW
      2. fp add another on SUW
      3. add first fp on Security Settings
      4. add another fp on Security Settings
Test: atest FingerprintStatusUtilsTest BiometricsSafetySourceTest
Test: robo test for SetupFingerprintEnrollFindSensorTest
      SetupFingerprintEnrollFinishTest
      FingerprintEnrollFindSensorTest FingerprintEnrollEnrollingTest

Merged-In: Ib1c2ef9f93fb910eed2930f871c0c69bdb94bcbd
Change-Id: Ib1c2ef9f93fb910eed2930f871c0c69bdb94bcbd
(cherry picked from commit 84b39c3ed0)
2022-08-29 07:21:42 +00:00
Milton Wu
e167286a37 Use Mockito 4.6.1 FingerprintEnrollFindSensorTest
Due to java import has been changed in downstream, update import part to
use Mockito 4.6.1 inside FingerprintEnrollFindSensorTest to prevent
downstream merge conflict.

Bug: 243701933
Test: roboTests FingerprintEnrollFindSensorTest
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
Change-Id: Idbf7852d95b248293909f73a0cce69de166931c9
2022-08-29 06:44:32 +00:00
Bonian Chen
d2644b4ea9 Merge "[Settings] Not allow APN delete when adding is not an option" into tm-qpr-dev 2022-08-26 10:52:02 +00:00
Bonian Chen
9202260a42 [Settings] Not allow APN delete when adding is not an option
When not allowing APN to add, user may not be able to recover easily
when delete it.

Therefore, avoid from APN to be deleted when adding is not allowed.

Bug: 200875858
Test: local, robolectric
Change-Id: I5cf984000244b4ad901c6a4977a1368279323e0a
2022-08-26 08:50:51 +00:00
lbill
e944661955 Cancel UDFPS enrollment on overlay focus loss
Integrate onWindowFocusChanged() to FingerprintEnrollEnrolling
When the activity window lost focus, we just cancel this enroll
session, and create a dialog to notify user.

* Keep legacy rotation behavior, do not cancel enrollment if user
  rotate device.
* This change will cancel enrollment when user interrupted by
  1) Swipe down Notification Shade
  2) Heads up notification expand
  3) Bubble Expanded
  4) Google Assist
  5) PIP expand
  6) Recents
  7) Launch Power Menu(Global Action)

Test: manual test above scenario
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=FingerprintEnrollEnrollingTest
Bug: 228261883
Bug: 242478941
Bug: 227905887
Change-Id: Id097e6b15928646cd5ab91c2a1f6eb1bb9bf190b
2022-08-26 01:30:33 +00:00
Bill Lin
fd8e54e391 Merge "Set appropriate theme for SkipFingerprintDialog" into tm-qpr-dev 2022-08-25 04:36:14 +00:00
Chloris Kuo
6f79ffd831 Merge "Support ACTION_NOTIFICATION_ASSISTANT_DETAIL_SETTINGS in Enhanced Notifications" into tm-qpr-dev 2022-08-24 22:37:58 +00:00
Chloris Kuo
54c677a83c Support ACTION_NOTIFICATION_ASSISTANT_DETAIL_SETTINGS in Enhanced Notifications
Show detail settings page from the default NAS app if it implements the new intent ACTION_NOTIFICATION_ASSISTANT_DETAIL_SETTINGS.

Test: Robotest, manually test on device
Bug: 231492005
Change-Id: I6566cd9d615331a56728613583295637982bcd3f
Merged-In: I6566cd9d615331a56728613583295637982bcd3f
2022-08-24 19:51:08 +00:00
Michael Wright
1218065085 Merge "Revert^3 "Improve App notification loading"" into tm-qpr-dev 2022-08-24 15:24:15 +00:00
lbill
7a4ddb8337 Set appropriate theme for SkipFingerprintDialog
The SkipFingerprintDialog is instantiation in
SetupFingerprintEnrollFindSensor#onSkipButtonClick()

Due to the call flow did not set appropriate theme
defined in setuplib for skip alertDialog instance
we set GlifV2ThemeAlertDialog AlertDialog.Builder.

Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: manual factory reset, go through SUW, and check
      skip AlertDialog Bottom Bar Buttons visual.
Bug: 233243999
Change-Id: Ic198a23eb3e76d70e287b24f2ab1ef249b30b2fc
2022-08-24 13:45:21 +00:00
Michael Wright
475632c4fe Revert^3 "Improve App notification loading"
33710fd9e2

Change-Id: Ifb45f949c28bff04f8abfe3e1a73628f2e407241
2022-08-24 12:22:12 +00:00
Wesley Wang
a0c76c92a1 Merge "Update extra defend layout string" into tm-qpr-dev 2022-08-24 05:11:03 +00:00
YK Hung
821c5702cd Merge "Reduce the calling times for isExtraDefend" into tm-qpr-dev 2022-08-24 05:08:48 +00:00
TreeHugger Robot
adf79eae3e Merge "Port battery usage bug fixing cls from master to tm-qpr-dev" into tm-qpr-dev 2022-08-24 05:04:05 +00:00
Pajace Chen
b00140b7a3 Reduce the calling times for isExtraDefend
Only calling this HAL API when BatteryDefenderTips card need to be shown

Bug: 243465597
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: Iae3c03d946ec29fe78a826ce62b6bebd893704ef
2022-08-23 20:15:50 +08:00