Commit Graph

119556 Commits

Author SHA1 Message Date
Amy Hsu
0d9e5d600c [RRS] show resolution option on Settings page.
Due to the special width/ height of the device, we have to modify the
available condition otherwise the resolution option cannot be shown on Settings.

Bug: 258346214
Test: Lunch Settings and check the Display page
Change-Id: I577e0e1227727aab75787c1f6115091e0c6158e1
2023-01-10 07:41:43 +00:00
Bonian Chen
61c45064cd [Settings] Limit height of TextView when text too long
Adjust the layout through having ConstraintLayout for limiting the
height of TextView.

Bug: 205460459
Test: local

Change-Id: Ic15af4c9be393a6855d78a5d9af086b099c9b689
2023-01-10 07:36:21 +00:00
Chaohui Wang
12b2f7cbe9 Update for AppOpsController changes
Bug: 235727273
Test: Manually with Settings
Change-Id: Ic4f4d6354b471500ee727e513ff161f0ee1e3225
2023-01-10 15:33:55 +08:00
Kuan Wang
a708592e0a Add logging for total screen-on time and foreground usage time.
Test: manual
Bug: 260965322
Change-Id: Ia1711fb73a6390e6a91289331daf3d88675731fe
2023-01-10 14:36:01 +08:00
Bonian Chen
817786c698 Merge "[Settings] Support of Primary IMEI feature" 2023-01-10 05:39:15 +00:00
tom hsu
c03ff3b870 Expose the regional preferences page
- Settings -> language & input -> Regional preferences

Bug: b/246929960
Test: atest pass.
Change-Id: I650111147a95a09b3b52518e6369ede0a4275857
2023-01-10 13:11:08 +08:00
Milton Wu
dc8f967315 Merge "Refactor FingerprintEnrollFindSensor" 2023-01-10 02:44:35 +00:00
Nate Myren
027d64c84c Add "Data Sharing Updates" to legacy Privacy Page
Note: Strings are non-final

Test: manual
Fixes: 261663929
Change-Id: Ia036a3bf715d10f94f17faf5b571896ca229a39a
2023-01-09 16:47:35 -08:00
TreeHugger Robot
7bc6dd9609 Merge "Exported A11y features blocked by IT admin can be bypassed using a11y shortcuts" 2023-01-10 00:40:48 +00:00
Milton Wu
3be7385d90 Refactor FingerprintEnrollFindSensor
Refactor FingerprintEnrollFindSensor to 3 pages for different sensor
types, and apply MVVM for them.

Bug: 259664912
Bug: 260957195
Bug: 260957816
Test: atest FingerprintRepositoryTest FingerprintEnrollmentActivityTest
      AutoCredentialViewModelTest FingerprintEnrollIntroViewModelTest

Change-Id: Iace790952567cac13e61e5175e90555d4da7dfe2
2023-01-10 07:52:37 +08:00
Diya Bera
00dfcd83dc Fixes background color in SUW fingerprint enrollment
Test: Manual (Enroll fingerprint in SUW, background color remains the
same)
Bug: 246231650
Bug: 250464527

Change-Id: Iffd1543d8b230199c3b925c6538bd418a381c96a
2023-01-09 23:52:34 +00:00
TreeHugger Robot
25e8018d78 Merge "Fix settings bug (pt 2)" 2023-01-09 22:25:22 +00:00
Menghan Li
526ababc60 Merge "Dynamic update a11y settings when a11y service target is disabled" 2023-01-09 22:06:26 +00:00
Kevin Liu
2d0ad56211 Merge "Use Mockito 4.6.1 API" into tm-dev am: 521278a00d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20838198

Change-Id: Id97ac2555495237fef8fd8c5b874db855ab7bce0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 21:31:42 +00:00
Kevin Liu
521278a00d Merge "Use Mockito 4.6.1 API" into tm-dev 2023-01-09 20:54:06 +00:00
Tom Hsu
8e631a1905 Merge "[Regional preferences] Add numbering system page." 2023-01-09 17:25:10 +00:00
Victor Truong
9246bceb5d Merge "Change screensaver option to be available to MainUser." 2023-01-09 17:22:25 +00:00
Bill Yi
87ee0400a8 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 9f8b28eaf4 -s ours am: 754110751c -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20907730

Change-Id: I8f588246e1d5966ab207c4749ab4ee23bce78f94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 15:49:31 +00:00
Lucas Silva
e33639f117 Only show communal settings to the primary user
Fixes: 264284347
Test: flashed device, and verified settings don't appear for secondary
user. Setting still appears for primary user
Test: atest CommunalPreferenceControllerTest

Change-Id: I6686ce4dbc7d708a93131620ae93c5e0dc323995
2023-01-09 15:15:27 +00:00
Bill Yi
754110751c [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 9f8b28eaf4 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20907730

Change-Id: I9b35a6c8266325bd03509096103cdc9228a9735f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 15:09:58 +00:00
tom hsu
6461d16c59 [Regional preferences] Add numbering system page.
- Add language selection page
 - Add number format page
 - Refactor some part for readability.

Bug: b/247073388
Bug: b/246929960
Test: atest pass

Change-Id: I617698a3146b6e461467a97de8c08f4c4dc6e7f2
2023-01-09 22:54:57 +08:00
TreeHugger Robot
1b4428ea3d Merge "[Battery usage U] [UI] Show screen time in the battery usage app list items" 2023-01-09 11:33:10 +00:00
TreeHugger Robot
95b9ca6573 Merge "Revert "Fix the inverted logic to judge whether an app is system app."" 2023-01-09 09:39:02 +00:00
Zaiyue Xue
48a1dacc39 [Battery usage U] [UI] Show screen time in the battery usage app list items
https://drive.google.com/file/d/1N2yrra6cga6CRIXzxTGhctcxwN47lE89/view?resourcekey=0-qlw1a78Ph-gSfXFAHKoumQ
https://drive.google.com/file/d/1joSI3YL8dn0rRW1Ywyte7MUy_CTDFS2p/view?resourcekey=0-VsgaqSi2YUfn6ImZEOBH-g

Bug: 258120710
Test: manual
Change-Id: Id22d2490d0bffeb8b7d2e0941bcdb4e3d352e966
2023-01-09 17:26:56 +08:00
Arc Wang
1aaba85238 Merge "Enable the android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED property" 2023-01-09 09:24:57 +00:00
TYM Tsai
be9cb36c6e Fix html injection in Autofill confirmation dialog
AutofillService can inject html in its label. The label will
be padded with line breaks which puts the warning off screen.
To fix the issue, disable html injection of the label.

Bug: 216117246
Test: Manual, check the label of the sample in
      the confirmation dialog
Change-Id: I244d8e9eadbacae6af615d1d2a5a99c86e4fa456
2023-01-09 08:35:56 +00:00
TYM Tsai
a1ca72224d Fix Content Capture service starting after restriction
When a device owner and a profile owner restrict Content Capture,
there should be no toggle setting to turn on Content Capture.

Bug: 250573776
Test: Manual. Use setps on the comment#3,
      make sure no toggle setting in the Privacy page.
Change-Id: Ia17f852b224c67b9c1cf5846ee9ad5592a485bab
2023-01-09 08:34:40 +00:00
lbill
b54ca63996 3-1/ Impl FoldProvider.FoldCallback for Face enroll activities
Create a mechanism to allow OEM config posture guidance with
'config_face_enroll_guidance_page', and customize the config
'config_face_enroll_supported_posture' with standard postures
         0 : DEVICE_POSTURE_UNKNOWN
         1 : DEVICE_POSTURE_CLOSED
         2 : DEVICE_POSTURE_HALF_OPENED
         3 : DEVICE_POSTURE_OPENED
         4 : DEVICE_POSTURE_FLIPPED
For example, if we set 1 for the device, then device only
allow to enroll face in closed(folded) state, if device do
not in the allow state, we will prompt specific guidance
page activity defined in config_face_enroll_guidance_page.

At this stage , we only integrate 2 states OPENED/CLOSED through
ScreenSizeFoldProvider and register for onFoldUpdated() callback
- isFold(DEVICE_POSTURE_CLOSED): finish posture guidance
- !isFold(DEVICE_POSTURE_OPENED): launch posture guidance
- onActivityResult : reset mOnGuidanceShown false

1. Fix A11y lottie animation bug
2. Impl FoldProvider.FoldCallback
3. Register callback to ScreenSizeFoldProvider
4. Integrate back stack, skip, cancel events
   - Back key : RESULT_CANCELED
   - Skip btn : RESULT_SKIP
   - Posture changed : RESULT_FINISHED
5. Set single instance for relative activities
6. FaceEnrollFoldPage listen for onConfigurationChanged()
7. Add empty face_posture_guidance_lottie.json for overlay

Test: atest SettingsGoogleUnitTests
Test: m -j SettingsGoogleRoboTests RunSettingsGoogleRoboTests
Test: m RunSettingsRoboTests ROBOTEST_FILTER= \
      "com.android.settings.biometrics.face.FaceEnrollEducationTest"
Test: m RunSettingsRoboTests ROBOTEST_FILTER= \
      "com.android.settings.biometrics.face.FaceEnrollIntroductionTest"
Test: Manual launch security settings face enroll, unfold device
and observe posture guidance showing fullscreen on top
Test: Fold device ensure the posture guidance activity finish
Bug: 261141826
Fixes: 231908496

Change-Id: Ib9f43f82f7d19f3f187c2f6f8984e76cd843afbc
Merged-In: Ib9f43f82f7d19f3f187c2f6f8984e76cd843afbc
2023-01-09 08:28:26 +00:00
lbill
e05697fc65 2-1/ Add config_suw_support_face_enroll to customize SUW face enroll flow
1. Add config_suw_support_face_enroll default is TRUE
2. Impl FaceFeatureProvider to obtain the config
3. Overlay config_suw_support_face_enroll by requirements

Test: Flash build and manual check if device go through face enroll in SUW
Bug: 262469686
Change-Id: I61aa5c818bedfb490f2172a7481f59fda7295c1a
Merged-In: I61aa5c818bedfb490f2172a7481f59fda7295c1a
2023-01-09 08:27:48 +00:00
Milton Wu
8e57808247 Fix face enroll introduction crash after 10mins
When requestGatekeeperHat() throws exception in FaceEnrollIntroduction
page, remove gk_pw_handle and recreate activity to trigger confirmLock.

Test: robotest for FaceEnrollIntroductionTest
Bug: 234437174
Change-Id: Ie1dd6f36e4deb3f776e3b39acd165fc47d04f526
Merged-In: Ie1dd6f36e4deb3f776e3b39acd165fc47d04f526
2023-01-09 07:38:59 +00:00
Zaiyue Xue
9a35838436 Revert "Fix the inverted logic to judge whether an app is system app."
This reverts commit 814eff1c24.

Reason for revert: The original logic is right.

Change-Id: I2aee0f9ab13c60d843e91056de9d409a1d84b9d4
2023-01-09 07:30:35 +00:00
lbill
bbca300b30 5/ Refine SetupChooseLockPattern layout by design
Since the SetupChooseLockPattern include header icon
header title, header sub-title, pattern state description,
LockPatternView and FooterBar, there was a limited room
for LockPatternView especially in the confirm steps which
both header title and pattern description occupy 2 lines space.
Hance the PatternView size used to inconsistence in-between
1st draw and 2nd confirm draw, besides it's visual looks
jumping and small on some device which have smaller display.

This solution includes 3 changes:
1. Organized the pattern view message to leverage
   header sub-title view, then we can resever more space.
   (Set minHeight=2 for sub-title)
2. Set screen_lock_options button visibilty to GONE when
   the stage in 2nd confirmation.(Previously it's INVISIBLE
   and reserve additional space)
3. Let LockPatternView align bottom of FrameLayout to prevent
   the view juming and flicker.
4. Clean up unused forAnyBiometric flag and code.
5. GlifLayout.getDescriptionTextView() == mHeaderView
   Need setDescriptionText() to make the view from GONE -> VISIBLE
6. Polish the stage flow and ensure IntroductionStage show
   correct message
7. Add ChooseLockPattern into embeded activity white list
   Force show ChooseLockPattern in fullscreen in case the Pattern
   view truncated in `NeedToConfirmStage` where the title showing
   2 lines and push pattern view down, and get bad UX in the
   device which integrate a shorter display.
8. Add test cases for all stage and polish legacy test code.

Test: make RunSettingsRoboTests ROBOTEST_FILTER= \
     "com.android.settings.password.SetupChooseLockPatternTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER= \
     "com.android.settings.password.ChooseLockPatternTest"
Bug: 249974175
Bug: 260027850
Change-Id: I868af9b14ba99af5d78a05f6c2a570ccc07aea15
2023-01-09 05:30:33 +00:00
lbill
43f0076830 2/ Define pattern view size by UX deck
1. Set biometric_auth_pattern_view_size: 348dp (portrait)
2. Set resilience size 248dp~348dp for landscape mode
   biometric_auth_pattern_view_(max_)size
3. Set 348dp size for sw410dp when display density < 560
   Set 248dp-348dp resilience size for sw410dp-land
4. Add sw392dp sw392dp-land with density 440 projects
5. Set sw600dp/sw720dp/sw800dp for large screen device
6. Reference dimen biometric_auth_pattern_view_size in style
7. Remove redundant dup AuthCredentialPatternContainerStyle
8. Remove max & min bounds from AuthCredentialPatternContainerStyle
9. Remove unused choose_lockscreen_min_height dimen
10. Reduce footerText min hight to reserve more space for pattern view

Bug: 234847272
Bug: 243008023
Bug: 243699695
Test: manual
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=\
      ChooseLockPatternTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=\
      SetupChooseLockPatternTest
Change-Id: Icfc2932279aa9e3a065030dbb7ff73f12ed6d081
Merged-In: Icfc2932279aa9e3a065030dbb7ff73f12ed6d081
2023-01-09 05:30:33 +00:00
lbill
fbed9b87ce 3/ SUW lib Glif and theme add additional padding in sud_layout_content
Temporary remove the redundant padding from ChooseLockPattern and
ConfirmLockPattern as a workaround solution.

Bug: 243008023
Test: make and check visual on foldable
Test: make RunSettingsRoboTests
Change-Id: I0baa2be65b797ca70f9de43bc8c5e3187a2d28ad
Merged-In: I0baa2be65b797ca70f9de43bc8c5e3187a2d28ad
2023-01-09 05:30:33 +00:00
Vincent Wang
b8926bd868 Merge "Launch FaceEnrollPage form BiometricEnrollActivity" 2023-01-09 04:56:44 +00:00
Bill Lin
3072c2a571 Merge "5/ Refine SetupChooseLockPattern layout by design" 2023-01-09 04:46:04 +00:00
Bill Lin
5f1fcab0fa Merge changes from topic "tuscany_settings_posture_support"
* changes:
  3-1/ Impl FoldProvider.FoldCallback for Face enroll activities
  2-1/ Add config_suw_support_face_enroll to customize SUW face enroll flow
2023-01-09 04:26:50 +00:00
TreeHugger Robot
3eabebb730 Merge "Change all the system items unclickable in battery usage list." 2023-01-09 02:47:57 +00:00
Arc Wang
cf4ee7be4c Enable the android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED property
Future WM Jetpack library updates will ask for the property to
enable ActivityEmbedding feature.

Bug: 264733035
Test: build pass
Change-Id: I0f5e5a10250049fb9425eac7c113b803b6701cc7
2023-01-09 10:26:07 +08:00
Jason Hsu
72fb811bc8 Merge changes from topic "hearing_shortcut"
* changes:
  [Hearing device shortcut] Provide a way to open accessibility hearing device settings via intent
  [Hearing device shortcut] Setup shortcut for hearing device
2023-01-09 01:51:51 +00:00
Bill Yi
9f8b28eaf4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I76b6b2f37d0dee1347d3c5b16b9d6ba3088b31aa
2023-01-08 02:43:59 -08:00
Bill Yi
f9dc317eea Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If0df803277fdbe100925db2dbce82a0a65570c8e
2023-01-08 02:35:33 -08:00
TreeHugger Robot
8a58b1bea8 Merge "Simplifies serviceSupportsAccessibilityButton by checking service info." 2023-01-08 04:57:54 +00:00
lbill
7135d36d37 5/ Refine SetupChooseLockPattern layout by design
Since the SetupChooseLockPattern include header icon
header title, header sub-title, pattern state description,
LockPatternView and FooterBar, there was a limited room
for LockPatternView especially in the confirm steps which
both header title and pattern description occupy 2 lines space.
Hance the PatternView size used to inconsistence in-between
1st draw and 2nd confirm draw, besides it's visual looks
jumping and small on some device which have smaller display.

This solution includes 3 changes:
1. Organized the pattern view message to leverage
   header sub-title view, then we can resever more space.
   (Set minHeight=2 for sub-title)
2. Set screen_lock_options button visibilty to GONE when
   the stage in 2nd confirmation.(Previously it's INVISIBLE
   and reserve additional space)
3. Let LockPatternView align bottom of FrameLayout to prevent
   the view juming and flicker.
4. Clean up unused forAnyBiometric flag and code.
5. GlifLayout.getDescriptionTextView() == mHeaderView
   Need setDescriptionText() to make the view from GONE -> VISIBLE
6. Polish the stage flow and ensure IntroductionStage show
   correct message
7. Add ChooseLockPattern into embeded activity white list
   Force show ChooseLockPattern in fullscreen in case the Pattern
   view truncated in `NeedToConfirmStage` where the title showing
   2 lines and push pattern view down, and get bad UX in the
   device which integrate a shorter display.
8. Add test cases for all stage and polish legacy test code.

Test: make RunSettingsRoboTests ROBOTEST_FILTER= \
     "com.android.settings.password.SetupChooseLockPatternTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER= \
     "com.android.settings.password.ChooseLockPatternTest"
Bug: 249974175
Bug: 260027850
Change-Id: I868af9b14ba99af5d78a05f6c2a570ccc07aea15
2023-01-07 19:36:47 +00:00
TreeHugger Robot
599a3b11f2 Merge "[Settings] Reduce CDMA API access when not required" 2023-01-07 14:42:58 +00:00
Betty Chang
cec69b6461 [automerger skipped] Merge "[RESTRICT AUTOMERGE] Change the intent flag to immutable" into tm-dev am: 145d91b832 am: ddeff2f67f -s ours am: 30783964b3 -s ours am: f0b70510d8 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20844713

Change-Id: Iab86570628e38936f74ffe24621ce5790f192812
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-07 09:45:03 +00:00
changbetty
623b87a885 [automerger skipped] [RESTRICT AUTOMERGE] Change the intent flag to immutable am: 0dcd6a5492 am: 7888fcc82b -s ours am: e7f0596113 -s ours am: 3afa2f08f2 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20844713

Change-Id: I8acbe814bb2235b1ae06ac5b96c7f41dba2f80cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-07 09:44:56 +00:00
Betty Chang
f0b70510d8 [automerger skipped] Merge "[RESTRICT AUTOMERGE] Change the intent flag to immutable" into tm-dev am: 145d91b832 am: ddeff2f67f -s ours am: 30783964b3 -s ours
am skip reason: Merged-In I68132f863027fab19351b4fdbc363e5c274e3327 with SHA-1 09a6899fc2 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20844713

Change-Id: I292f88e40c9e6228dd6395fa6f6be4cf896ce4c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-07 09:09:10 +00:00
changbetty
3afa2f08f2 [automerger skipped] [RESTRICT AUTOMERGE] Change the intent flag to immutable am: 0dcd6a5492 am: 7888fcc82b -s ours am: e7f0596113 -s ours
am skip reason: Merged-In I68132f863027fab19351b4fdbc363e5c274e3327 with SHA-1 09a6899fc2 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20844713

Change-Id: Id7b72ef1e840e8c401d5167691d892fc54fa56de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-07 09:09:06 +00:00
Yanting Yang
2aab7ae039 [automerger skipped] Add DISALLOW_APPS_CONTROL check into uninstall app for all users am: 86914bedc8 -s ours am: 6326f5e65a -s ours am: a617639496 -s ours am: 8c70085bab -s ours am: b1391d7eb2 -s ours am: b842d569bf -s ours am: 618af44b70 -s ours am: d0c69f7ae7 -s ours am: ab4cd3acdf -s ours
am skip reason: Merged-In I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6 with SHA-1 1a43a98334 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20871685

Change-Id: I3f9ee4caa3318c66ad56b56bf5b6fa2a3fee0640
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-07 08:40:08 +00:00