Commit Graph

11 Commits

Author SHA1 Message Date
Jason Chang
58bc2e3dca Fix the option to set a different screen lock in the "Set a PIN"
screen is displayed off the screen when the device language is set
to Arabic

To call optButton's MarginLayoutParams setMarginStart() instead of
set leftMargin.

Flag: EXEMPT bugfix

Bug: 355422248

Test: build Forrest ROM and verify the UI
Change-Id: I700b83937ecd8509864fa3c80826de0ba0437ca2
2024-08-05 08:55:10 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Jason Chang
c0f0b0ca1a Fix the “screen lock option” and password restriction view are
in the wrong position on PIN/Password/Pattern in the landscape mode.

1. Move the description position under the GlifLayout header
2. Move the position "Screen lock options" button under the
GlifLayout header

Bug: 272676038
Bug: 285271342

Test: manully test with reproducible steps:
STEPS TO REPRODUCE:
1. Go through the setup flow
2. Continue steps until “set pin” page
3. The “screen lock option” is in the wrong position

Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings
.password.SetupChooseLockPasswordTest"

Change-Id: I24464e6b7e93f20abbeb59426919ed7fec5c7cbb
2023-06-29 07:11:42 +00:00
Makoto Onuki
baacfd7985 Use different exceptions for different crash reasons
Always throwing RemoteServiceException would make it impossible to
tell the cause of a crash without the string message.

Let's use a different exception type so developers can cluster crashes
without the exception message.

Bug: 124137635
Test: Treehugger
Change-Id: Ibae57bdb1b8965241c41249a89c728d224e4e995
2021-11-16 11:59:05 -08:00
Christopher Tate
9efc5ab929 Track framework changes to crashApplication API
Bug: 128649910
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: Ia613372360f8b32f6ad3b7d2092e7cb27f067fbc
2019-08-28 16:48:04 -07:00
Bernard Chau
00870bff0d Logging SetNewPasswordActivity events
Every launch of the activity with either ACTION_SET_NEW_PASSWORD
or ACTION_SET_NEW_PARENT_PROFILE_PASSWORD is logged, regardless
of whether extra EXTRA_PASSWORD_COMPLEXITY is used or whether
the caller has the required permisssion or not
- action: ACTION_SET_NEW_PASSWORD or
ACTION_SET_NEW_PARENT_PROFILE_PASSWORD
- pageId: SET_NEW_PASSWORD_ACTIVITY
- key: calling app package name
- value: raw value of intent extra EXTRA_PASSWORD_COMPLEXITY, or
Integer.MIN_VALUE if it does not exist

Bug: 120840632
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/PasswordUtilsTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/SetNewPasswordActivityTest.java
Change-Id: I57dc55110f7f284ddad7d3fc971d1f2298b46cbd
2019-02-01 13:03:40 +00:00
Fan Zhang
c3fd289969 Remove dead code.
Bug: n/a
Test: rebuild
Change-Id: I71f8d9d99bbff1186e8df518ec8d27db3447ffbe
2019-01-29 16:27:31 -08:00
Bernard Chau
92db5bf4f7 New extra for ACTION_SET_NEW_PASSWORD to specify the min complexity
When an app that has the permission GET_AND_REQUEST_PASSWORD_COMPLEXITY
launches ACTION_SET_NEW_PASSWORD, it can use the DPM PASSWORD_COMPLEXITY_*
constants to specify the complexity it wants in a new extra
EXTRA_PASSWORD_COMPLEXITY.
The screen lock type picker would then filter out the options which
cannot fulfil the min complexity (and DPM restrictions) and will show a
footer with a brief description of the calling app and the requested type.
The same password requirements UI is used in ChooseLockPassword screen
to display the minimum requirements that can fulfil both DPM
restrictions and the min complexity.

The app must have permission GET_AND_REQUEST_PASSWORD_COMPLEXITY
otherwise the extra would be ignored.

ACTION_SET_NEW_PASSWORD is also updated to always display the calling app
name in the screen lock type picker if it is not launched by Settings,
with or without the new extra.

Bug: 111173457
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockGenericControllerTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockGenericTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/ChooseLockPasswordTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/PasswordUtilsTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/SetNewPasswordActivityTest.java
      atest packages/apps/Settings/tests/robotests/src/com/android/settings/password/SetupChooseLockGenericTest.java
      manual test with TestDpc (ag/5901733)

Change-Id: I21a25d28669bf1223c3b02ba85c0755e59feee2e
2019-01-24 08:02:33 +00:00