Commit Graph

13975 Commits

Author SHA1 Message Date
Diya Bera
7eb40da9c4 Add animation for progress bar and lottie in fingerprint enrollment
Test: Manual - While enrolling a fingerprint, onHelp will cause the
lottie and progress bar to shake
Bug: 266838595

Change-Id: I547d86182a87846aca7d025b35a008675f449e2e
Merged-in: I547d86182a87846aca7d025b35a008675f449e2e
2023-02-07 22:48:55 +00:00
Josh Hou
1739114d44 Merge "Fix the security vulnerability issue in AppLocalePickerActivity" into tm-qpr-dev 2023-02-02 00:15:12 +00:00
Diya Bera
1021b58ae5 Tests for SUW in work mode
Bug: 247049655
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=MultiBiometricEnrollHelperTest
Change-Id: Ifabb96a90c340bc9306cc0f033ba103c614f32a9
2023-02-01 22:05:09 +00:00
Josh Hou
5d7d1665fe Fix the security vulnerability issue in AppLocalePickerActivity
Examine whether the packages is allowed to display app locales list when creating the AppLocalePickerActivity, and examine whether the target user is the same as the calling user.

Bug: 257954050
Test: Follows the test step listed in b/257954050#comment14
Change-Id: I2e25a308bcba6ea0edee89c7a78465f766bdbeac
Merged-In: I2e25a308bcba6ea0edee89c7a78465f766bdbeac
2023-02-01 15:42:22 +08:00
Steve Elliott
f127bc13b0 Setting to control seen notification filtering
Test: manual
  1. adb shell settings put secure \
     lock_screen_show_only_unseen_notifications <0|1>
  2. Settings > Notifications > General > Show only new notifications on
     lock screen
  3. Toggle setting
  Observe: if setting is enabled, seen notifications are filtered from
           the lockscreen, and vice versa
Bug: 254647461
Change-Id: I4f6e35a1d918095cea25a97f72ddd08869ad9b31
2023-01-19 22:22:30 +00:00
TreeHugger Robot
66e23eb89c Merge "5/ Refine SetupChooseLockPattern layout by design" into tm-qpr-dev 2023-01-17 03:56:35 +00:00
Behnam Heydarshahi
cf022d4537 Merge "Ring & notif vol missing on a largescreen device" into tm-qpr-dev 2023-01-12 16:15:27 +00:00
Josep del Río
98bfab5f23 Merge "NEW Use Mockito 4.6.1 API" into tm-qpr-dev 2023-01-12 14:17:44 +00:00
Bill Lin
34d144265d Merge changes from topics "disable_face_enroll_inSUW", "tuscany_FaceEnrollFoldPage" into tm-qpr-dev
* changes:
  3-1/ Impl FoldProvider.FoldCallback for Face enroll activities
  2-1/ Add config_suw_support_face_enroll to customize SUW face enroll flow
  Fix face enroll introduction crash after 10mins
2023-01-12 06:47:45 +00:00
Sorin Basca
a962b4b712 NEW Use Mockito 4.6.1 API
Addressing skipping merge issue

Bug: 236636175
Test: atest SettingsRoboTests
Change-Id: Ie7caae0ea9aa212f1ee06d6fe89fa0776979e4e6
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2023-01-12 01:35:44 +00:00
Behnam Heydarshahi
18469d2975 Ring & notif vol missing on a largescreen device
Before:
"Ring & notification volume" showed up in volume panel and in volume
settings.

Now (what prompted this bugreport):
A device config was changed to mark it not voice capable.
"Ring & notification volume" disappeared from both places;
"Notification volume" showed up only in volume settings, not panel.

Fix: the voice capable should not be a factor when determining
availability for ring/notification slices.

After this fix is applied:
"Ring & notification volume" to reappear at both settings and panel.

Bug: 256548882

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="VolumePanelTest|RingVolumePreferenceControllerTest|NotificationVolumePreferenceControllerTest|SeparateRingVolumePreferenceController" RunSettingsRoboTests -j40

Change-Id: Ie2b1913bde6a64303c4d9fde3724889f949c363b
2023-01-11 22:14:29 +00:00
Joshua McCloskey
b8695b8e76 Added performant auth feature
Test: Manually verified in settings that the performant auth
feature(fingerprint) is disabled by default
Bug: 261216422
Bug: 265031172

Change-Id: I6422b12f801d038fa514758eca34efcbfdeef27a
2023-01-11 16:43:54 +00:00
TreeHugger Robot
61f81ffb07 Merge "Update wallet setting availability" into tm-qpr-dev 2023-01-11 14:54:39 +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
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
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
Karen Lu
869fd2f33e Revert "Use Mockito 4.6.1 API"
Revert submission 20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Reason for revert: Breaking the build on tm-qpr-dev. Bug tracked here: b/264473028

Reverted changes: /q/submissionid:20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Change-Id: Ie9d9d944093752f44eff67627e4a35f4df47e6de
2023-01-05 05:15:10 +00:00
Matt Pietal
c617ae851d Update wallet setting availability
For devices that don't support wallet, don't even show the setting in
a disabled state, which can cause confusion and lead the user to
believe they can enable it somehow.

Fixes: 251089510
Test: WalletPrivacyPreferenceControllerTest
Change-Id: I5d60957f24712bb4d75e72fa5f64cab35b6d6a5f
2023-01-04 21:39:43 +00: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
Sorin Basca
93c143ed0a Use Mockito 4.6.1 API
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-12-19 22:24:45 +00:00
YK Hung
d388dc1809 Merge "Update string for all defenders" into tm-qpr-dev 2022-12-16 04:51:46 +00:00
William Xiao
0be191aeb7 Merge "Default to timing out to dock user in 1 minute" into tm-qpr-dev 2022-12-15 20:04:15 +00:00
Zhenwei Chen
1eea27ae82 Update string for all defenders
Test: Unit test passed
Bug: 262508668
Change-Id: Ia0126f9761caa43d0746962a9bb77173e9f45ad1
2022-12-15 05:31:18 +00:00
Diya Bera
6b468377c1 Flicker in Fingerprint Enrollment
Fixes: 259707991
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=MessageDisplayControllerTest
Change-Id: I2581dfcc7054c5df1368d5d912dbbc4c8ea01f23
Merged-in: I2581dfcc7054c5df1368d5d912dbbc4c8ea01f23
2022-12-13 18:17:23 +00:00
William Xiao
ea655e9695 Default to timing out to dock user in 1 minute
Previous default was to disable the feature.

Bug: 260123067
Test: verified locally on device that the default is 1 minute for a new
user

Change-Id: I8f577d62b729eb1c1a0579a7b4eb6b50f7f7f0d8
2022-12-12 18:36:30 -08:00
Yi Jiang
1145b26ac7 Creates a flag for auto-rotate with face detection
The flag is enabled by default. And will be disabled on foldable
devices.

Test: locally
Bug: 236249360

Change-Id: I8c90533f6011531a4f00af5f2514579638604067
2022-12-12 19:49:16 +00:00
Darrell Shi
7bae5625a6 Merge "Update screensaver preference summary when on." into tm-qpr-dev 2022-12-12 16:41:38 +00:00
Darrell Shi
d1f5edfc78 Update screensaver preference summary when on.
The summary for screensaver preference is updated to, e.g. "On / Art
gallery".

Bug: 261907383
Test: 'make -j64 RunSettingsRoboTests \
ROBOTEST_FILTER="com.android.settings.dream.DreamSettingsTest"'

Change-Id: I40483f266c42a6e49e513208ba513d469d67f85a
Merged-In: I40483f266c42a6e49e513208ba513d469d67f85a
2022-12-09 17:36:01 +00:00
TreeHugger Robot
47d87cb48d Merge "Check multiple security types for Wi-Fi NetworkRequest" into tm-qpr-dev 2022-12-09 05:26:26 +00:00
Zhenwei Chen
72490ec149 Merge "Fix incorrect dock defender banner icon." into tm-qpr-dev 2022-12-08 03:33:57 +00:00
Weng Su
c4d0597373 Check multiple security types for Wi-Fi NetworkRequest
- The WifiEntry already support multiple security types simultaneously from framework

- For backward compatibility, WifiEntry supports both getSecurity and getSecurityTypes methods

- However, the getSecurity method can only return one type of security, causing NetworkRequest to fail to match another type of security
  - WifiEntry:      getSecurity:WPA2   // getSecurityTypes:{WPA2, WPA3}
  - ReqeustNetwork: getSecurity:WPA3

- Need to use getSecurityTypes to check for matching WifiEntry

Bug: 205943818
Bug: 249713442
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkRequestDialogFragmentTest

Merged-In: I8848ccd1cb0589284a48ddaa77591f5bf3b41932
Change-Id: I8848ccd1cb0589284a48ddaa77591f5bf3b41932
(cherry picked from commit a88c064842)
2022-12-07 18:15:44 +00:00
Zhenwei Chen
47fa893358 Merge "Fix batteryInfo unit test" into tm-qpr-dev 2022-12-07 08:31:44 +00:00
Zhenwei Chen
36c1e7dc20 Fix incorrect dock defender banner icon.
Screenshots:
https://screenshot.googleplex.com/32YV7V6A6wxBPxc.png
https://screenshot.googleplex.com/77iMZ8CeuE5W8wE.png

Bug: 261156455
Test: Unit tests passed and manual test on the device
Merged-In: I084c9cd52a408efa3b9aeee96a0af0cae481ec79
Change-Id: I084c9cd52a408efa3b9aeee96a0af0cae481ec79
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 52323128dc)
2022-12-07 05:46:57 +00:00
Zhenwei Chen
b41e06a5fb Fix batteryInfo unit test
Bug:261139453
Test: Unit test passed
Merged-In: I8f94f984dc1bf833653ae49557fdd02f736b365c
Change-Id: I8f94f984dc1bf833653ae49557fdd02f736b365c
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 54615b3bec)
2022-12-06 06:22:38 +00:00
Alejandro Nijamkin
f31108f11a Specifies nav destination when opening shortcuts.
Doing this will open the correct screen when clicking on "Shortcuts"
under Settings > Display > Lock screen.

Fix: 258471384
Test: manually verified that clicking on it opens the wallpaper picker
experience with the correct page showing.

Change-Id: I627bcb9c9fac7a834f1c9d9cb36b73a6c8817af5
2022-12-02 16:08:32 -08:00
Wesley Wang
1f139628b3 Merge "Fix LoaderCallback.onLoadFinished uncalled issue" into tm-qpr-dev 2022-12-01 06:30:10 +00:00
Arc Wang
252bf820ee Merge "Settings 2-pane deep link vulnerabilities" into tm-qpr-dev 2022-12-01 01:45:56 +00:00
Ale Nijamkin
d81ae0a645 Merge "Brings back "Control from locked device" setting." into tm-qpr-dev 2022-12-01 00:50:42 +00:00
Wesley Wang
2d30eaa3bd Merge "Clean up useless defender dialog code" into tm-qpr-dev 2022-11-30 11:57:01 +00:00
Alejandro Nijamkin
8eef47d0cc Brings back "Control from locked device" setting.
In ag/20427460, we made ControlsTrivialPrivacyPreferenceController, which controls this setting, be UNSUPPORTED_ON_DEVICE if customizable lock screen quick affordances are enabled.

This wrongly removes this setting from the Settings app and there is no new UI where the user can control that anymore. What this means is that, once users upgrade to an Android build with our feature, they will forever be stuck with whatever they last chose for "Control from locked device".

This CL brings that back but changes the behaviour a bit such that, if
the quick affordances feature is enabled, this setting is never
disabled.

Fix: 260722836
Test: Unit tests added. Manually verified that the setting is visible
and enabled if the feature is enabled, even if the current selection
does not include the Home quick affordance and that if the feature is
off, the setting is visible but disabled if the main setting is off (old
behaviour unchanged).

Change-Id: I2e53123b3b7a2896699aeaa13b0c7d5a1c8a9c92
2022-11-29 12:17:13 -08:00
Zhenwei Chen
07d208dfb1 Clean up useless defender dialog code
Test: Unit test passed
Bug: 260687359
Merged-In: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Change-Id: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit a725bac68c)
2022-11-29 10:31:45 +00:00
Zhenwei Chen
1d72ff642c Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug: 260687359
Test: Unit test passed and manual test on device
Merged-In: Ib6c09df056744142f42f5e2a13252b58e54c7534
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 8d11d9ceea)
2022-11-29 10:31:37 +00:00
Zhenwei Chen
72a892754d Fix LoaderCallback.onLoadFinished uncalled issue
When two loaders started almost at the same time,
it is possible onLoadFinished is never called.

Bug: 260687359
Test: Unit tests passed and manual test on device
Merged-In: I41a041d5878f9930db44775408380d0d4588faba
Change-Id: I41a041d5878f9930db44775408380d0d4588faba
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 41ce87729e)
2022-11-29 10:29:59 +00:00
Arc Wang
23412ad94a Settings 2-pane deep link vulnerabilities
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
   start the deep link Activity.

Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
Merged-In: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
2022-11-29 00:05:09 +08:00
Steve Elliott
fece948623 Merge "Revert^2 "Add configuration for defaulting notification behavior"" into tm-qpr-dev 2022-11-22 22:50:10 +00:00
TreeHugger Robot
6f908bae6f Merge "Adds settings item for quick affordances." into tm-qpr-dev 2022-11-22 02:59:15 +00:00
Alejandro Nijamkin
01df2b4ee2 Adds settings item for quick affordances.
This is in Display > Lock screen. It reads "Buttons" and the summary
text below it is a comma delimited list of the names of the
currently-selected quick affordances.

Fix: 256662519
Test: Manual verification that the lock screen and wallet
items are gone and the new item is visible and clicking it opens the
Wallpaper & style settings screen

Change-Id: If3746b5d0eb8c61edb9378cdb217ca248b999944
2022-11-21 16:42:45 -08:00
Steve Elliott
30ccc43ae1 Revert^2 "Add configuration for defaulting notification behavior"
Test: go through SUW on affected device, view notification screen
Bug: 240472040
Change-Id: I34dbe28226d830bc5ba633e72cd529d97021de85
2022-11-21 15:16:40 +00:00
Yi-Ling Chuang
2f80e073d0 Remove BatteryFixSlice as it's not used
The BatteryFixSlice hasn't been used for a while, and it's introducing
memory leaks due to a design change at the framework's end. Hence,
remove it.

Bug: 245385410
Test: robotests
Change-Id: I517cab71a32613d5cb5fcd3beb991a24926a2902
Merged-In: I517cab71a32613d5cb5fcd3beb991a24926a2902
(cherry picked from commit e3fcf1f082)
2022-11-18 10:58:42 +00:00
Sam Dubey
a2d06273c1 Revert "Add configuration for defaulting notification behavior"
Likely causing b/259499400

This reverts commit a92688d642.

Change-Id: I781a7ecf9139eca11e1db895f86268b893258543
2022-11-17 07:33:18 +00:00