Commit Graph

14818 Commits

Author SHA1 Message Date
Diego Vela
08aaab16dd Merge "Convert logs to use protologs." 2020-08-24 21:50:49 +00:00
TreeHugger Robot
5f358680cf Merge "Handle NPE in LocalImageResolver to avoid crashing systemui" into rvc-qpr-dev am: 6bf25fdfc4 am: 8517455df4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12421224

Change-Id: I42f1a691785b5476e3f8957440c80656e8c54e8a
2020-08-24 04:05:56 +00:00
TreeHugger Robot
8517455df4 Merge "Handle NPE in LocalImageResolver to avoid crashing systemui" into rvc-qpr-dev am: 6bf25fdfc4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12421224

Change-Id: Ia1613a1a7e5524112b8221fbc608270d4dd87664
2020-08-24 03:55:46 +00:00
Robin Lee
dfd866daf7 Allow devices without SECURE_LOCK to *clear* PINs
Otherwise upgrade devices get stuck and can't possibly recover.

Bug: 165634310
Change-Id: Iff3115ae734cdfdba09939915f00c1ce02fe6272
2020-08-21 20:59:35 +00:00
Diego Vela
f58acf9e39 Convert logs to use protologs.
Migrate add remove debug log from debug config to protolog.
Migrate configuration debug log from debug config to protolog.
Update protolog file

Bug: 153162675
Test: manual
Change-Id: Ie97f77ce3fe165a9be2ff970da7e777962b0db31
2020-08-21 18:51:32 +00:00
Ahan Wu
1a1c93f964 Handle NPE in LocalImageResolver to avoid crashing systemui
ContentResolver#openInputStream may return null, and may lead to
systemui keeps crashing, handle null to avoid this case.

Bug: 163412636
Test: manually
Change-Id: Ie149b75d4445b37afac82c8351a32cb17442936d
2020-08-21 14:18:08 +08:00
Hall Liu
99f3dc8aee Merge "Expose onEmergencyNumberListChanged, semantics change" 2020-08-20 19:29:58 +00:00
Sudheer Shanka
16749d5430 Merge "Add BstatsCpuTimesValidationTest to TEST_MAPPING." 2020-08-20 18:32:00 +00:00
Kevin Chyn
106cfaacad Merge "Return handle to gatekeeper password instead of actual password" 2020-08-19 22:33:02 +00:00
Hall Liu
cebecc648b Expose onEmergencyNumberListChanged, semantics change
Expose the onEmergencyNumberListChanged method, which seems to have been
left hidden inadvertently when introduced.

Add a new version of onOutgoingEmergencyCall that supplies a
subscription ID and deprecate the old one. Along with this, send
emergency call events from any subscription to all listeners regardless
of which subscription the listener specified.

Test: atest CtsTelecomTestCases:OutgoingCallTest
Bug: 162647577
bug: 165660452
Change-Id: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
2020-08-19 14:43:26 -07:00
Eran Messeri
346cee22ff Merge "DPMS refactoring: Get Profile / Device owner" 2020-08-19 10:01:11 +00:00
Vishnu Nair
5084fa3e83 Merge "Enable compositor shadows" 2020-08-18 23:50:19 +00:00
Eran Messeri
9ac405b39e DPMS refactoring: Get Profile / Device owner
Get the Profile Owner or Device Owner directly, rather than using the
ComponentName provided by the caller to look it up.

For DevicePolicyManager methods that are only callable by DO or PO,
there is no need to use the ComponentName to distinguish between
different potential admins, as there could be only one.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest
Change-Id: I5fc3345101c8f61c12a9bbdbd224e95e719a0795
2020-08-18 22:50:31 +01:00
Kevin Chyn
be2f80392c Return handle to gatekeeper password instead of actual password
This allows 1) LockSettingsService to ensure the password isn't
valid forever. 2) Password to stay in system_server

Also, adds ILockSettings#removeGatekeeperPasswordHandle
so that callers can clean up after themselves.

Bug: 161765592

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: I76534acc7af1e0f2e4d8af369fee31d1e19ddba9
2020-08-18 13:49:34 -07:00
Sudheer Shanka
f6bb547885 Add BstatsCpuTimesValidationTest to TEST_MAPPING.
Bug: 163674258
Test: atest --test-mapping core/java/com/android/internal/os:postsubmit
Change-Id: I64c58567c87e7a16b166f04e29e6b7b83c1aad22
2020-08-17 19:33:02 -07:00
Vishnu Nair
545fc92c8c Enable compositor shadows
Composition strategy has been fixed in R. This enables the
change in master.

Fixes: 165076424

Change-Id: I710ee561da66c84d018ce93882d8594080e87280
2020-08-17 23:48:27 +00:00
Julia Reynolds
d3dc8e79cf Merge "Remove app ops indicators from notifications" into rvc-qpr-dev am: 2659836775
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12361488

Change-Id: I70c1dd2665b51c442484577f0077ad4bebc0577d
2020-08-14 17:43:43 +00:00
Julia Reynolds
2778b62f1d Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
Merged-In: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-14 15:02:02 +00:00
Julia Reynolds
f9239b3afc Merge "Remove app ops indicators from notifications" 2020-08-14 13:17:42 +00:00
Alex Johnston
ae5e71786e Merge "Add precondition checks" 2020-08-13 22:21:27 +00:00
Alex Johnston
af1c3cb440 Add precondition checks
* Add precondition checks to check the call authorization
  and the calling user.
* Add CallerIdentity object and helper method to create
  and return a CallerIdentity object.
* Add isDeviceOwner check which takes in a CallingIdentity
* Update setLocationEnabled to use new precondition check

Bug: 162825394
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetLocationEnabled
Change-Id: I6054620aab661f302ebe0cb8c13bf906aad3cb68
2020-08-13 17:30:10 +01:00
Julia Reynolds
3a72daad2b Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-13 11:33:43 -04:00
TreeHugger Robot
c593e6adf8 Merge "Migrate PiP logs to UiEvent" into rvc-qpr-dev am: 178e18a7fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12132203

Change-Id: Ib6cc61278a9a1611f911a7ce246893746c6e1b54
2020-08-11 18:56:00 +00:00
Miranda Kephart
016ef828b4 Merge "Make screenshot process unbind correctly" into rvc-qpr-dev am: 8a912c716b am: bebfed8bbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12087986

Change-Id: I0f706c1aa3855d47286076aac4850912a3a664a7
2020-08-11 18:54:58 +00:00
TreeHugger Robot
178e18a7fc Merge "Migrate PiP logs to UiEvent" into rvc-qpr-dev 2020-08-11 18:49:47 +00:00
Miranda Kephart
bebfed8bbf Merge "Make screenshot process unbind correctly" into rvc-qpr-dev am: 8a912c716b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12087986

Change-Id: I63421e3e9672afb61842b75e9cc7a476cc3fb532
2020-08-11 18:20:46 +00:00
Miranda Kephart
8a912c716b Merge "Make screenshot process unbind correctly" into rvc-qpr-dev 2020-08-11 18:00:13 +00:00
Miranda Kephart
6bb575bab1 Make screenshot process unbind correctly
There's a bug in ScreenshotHelper that causes the process not to
unbind properly. Now that the screenshot connection is kept track
of by the class, we don't need to compare its value at the
beginning and end of the started service before closing the
connection.

This also fixes an issue where screenshots didn't work right,
immediately after switching users (since the process is now
closed correctly, a new one can begin for the secondary user).

Bug: 158303623
Bug: 160355802
Fix: 158303623
Fix: 160355802
Test: manual; tested single screenshots and multiple in succession;
made sure that after switching users screenshots could be taken
immediately.

Change-Id: Idf25c6a60bdde8ab970c4af68884de798159ef3f
2020-08-11 09:32:29 -04:00
Hongwei Wang
c9be08b5aa Merge "Move ProtoLog to shared place" 2020-08-11 01:48:28 +00:00
Suprabh Shukla
9e07b814cb Merge "Switching StatLogger to uptime" 2020-08-10 20:14:59 +00:00
Dmitri Plotnikov
326e3ca1fc Merge "Add binder call stats tracking for individual UID" 2020-08-10 17:21:48 +00:00
Kevin Chyn
19293693e8 Merge changes from topics "async-challenge", "lss-sp"
* changes:
  Remove GenerateChallengeBlocking from FingerprintManager
  Change GenerateChallengeCallback from abstract class to interface
  3/n: Remove challenge from verifyCredential
  2/n: Remove unnecessary RequestThrottledException for verify paths
  1/n: Allow LockSettingsService to return Gatekeeper Password
2020-08-08 00:05:53 +00:00
Kevin Chyn
cdf4b2868a 3/n: Remove challenge from verifyCredential
Decouples the remainder of challenges from LockSettingsService.
Clients that require Gatekeeper HATs that wrap challenges should
request the Gatekeeper Password, then request LockSettingsService
to verify(GatekeeperPassword, Challenge). If the challenge is
biometric-related, it must be generated after LockSettingsService
completes verifyCredential, since LockSettingsService internally
does generateChallenge/resetLockout/revokeChallenge.

Bug: 161765592
Test: CtsVerifier biometric portion
Test: Reset fingerprint/face lockout
Test: atest com.android.server.locksettings

Change-Id: Icb384194ce5007b264068e697113d55cbf94945b
2020-08-07 12:17:29 -07:00
Kevin Chyn
6e6a735e65 2/n: Remove unnecessary RequestThrottledException for verify paths
verifyCredential and verifyTiedProfileChallenge return a
VerifyCredentialResponse object instead of a byte[] now. Thus,
any/all information regarding the authentication attempt is
received by callers. We no longer need to use exceptions as a
method of returning an alternate non-byte[] result.

The RequestThrottledException cannot be completely removed yet
because checkCredential returns a boolean and has no way of
returning a timeout yet. See b/161956762

Bug: 161765592

Test: Accept/Reject/Lockout the following
      1) Owner profile
      2) Managed profile with separate challenge
      3) Managed profile with unified challenge
Change-Id: Ia61c71bdde42dec34d8f2eac86d7ea964b1485c2
2020-08-07 12:17:29 -07:00
Kevin Chyn
e7694cc54c 1/n: Allow LockSettingsService to return Gatekeeper Password
For certain scenarios, it's ideal if a single prompt for the user's
credential could generate multiple Gatekeeper HATs, each containing
a distinct challenge. To do so, we expose the gatekeeper password
to the caller, which can then be sent to LockSettingsService to
mint a Gatekeeper HAT with a challenge specified by the caller.

Functionally, this is split into two pieces:
1) ILockSettings#verifyCredential* has a new flags parameter,
   which if contains VERIFY_FLAG_RETURN_GK_PW, returns the gatekeeper
   password
2) ILockSettings introduces a new method, verifyGatekeeperPassword,
   which takes the Gatekeeper Password and challenge, from which
   Gatekeeper creates a HardwareAuthToken. This is different than
   the rest of spBasedDoverifyCredential and __only__ requests
   Gatekeeper to create the HardwareAuthToken. It does not proceed
   to do other things such as unlocking keystore keys, unlocking
   managed profiles, etc.

Slightly cleaned up VerifyCredentialResponse: moved to builder pattern,
cleaned up serialization/deserialization

Returning a VerifyCredentialResponse object (instead of a byte[])
also makes it easier to debug failure cases (e.g. credential was
verified but HAT was null, vs originally we have no idea). Similarly,
this allows us to remove RequestThrottledException, which can help
make it easier to reason about code flow (less unexpected nullness)

Test: Clients with VERIFY_FLAG_RETURN_GK_PW have correct "accept,
      reject, timeout" behavior
Test: Current biometric enrollment works and not affected
Test: PIN/Pattern/Password verifyGatekeeperPassword works
      (see ag/12222644)

Bug: 161765592
Change-Id: I6e2a7ea234aac1a278b35cdaff62b1c7e3e9f205
2020-08-07 12:17:29 -07:00
TreeHugger Robot
153d5a5b34 Merge "Add logging for nearby." 2020-08-07 18:51:09 +00:00
Susi Kharraz-Post
b80a4c4f17 Merge "Fix argument order in Sharesheet Started logging" into rvc-qpr-dev am: 4eb63b672f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12332850

Change-Id: I42efb7d531b40f6681e69f13901ad16f849e60d9
2020-08-07 18:42:42 +00:00
Alison Cichowlas
c737ae678a Add logging for nearby.
Bug: 157234789
Test: with statsd_testdrive; new tests in ChooserActivityTest
Change-Id: Iad154c4f18058b8a2c67aa6ca909d615db639f95
2020-08-07 12:39:09 -04:00
Susi Kharraz-Post
ce030f1d75 Fix argument order in Sharesheet Started logging
Argument order for westworld logging number of direct and app targets
provided by the app got turned around in the function call. Fixing the
order by moving the lines

Bug: 162982477
Test: manual
Change-Id: I23d0d2861c169b8e6eb26ce3040913db42f3e01f
(cherry picked from commit 6eb59aa87e)
2020-08-07 16:20:42 +00:00
Susi Kharraz-Post
97e02fa146 Merge "Fix argument order in Sharesheet Started logging" 2020-08-07 14:36:19 +00:00
Fabian Kozynski
2e552e3625 Merge "Separate mic + camera from location" into rvc-qpr-dev am: 515db30387
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12316034

Change-Id: If659f1af8b48637b8bc047be5074e1483db44e0b
2020-08-07 13:32:02 +00:00
Fabian Kozynski
515db30387 Merge "Separate mic + camera from location" into rvc-qpr-dev 2020-08-07 13:22:04 +00:00
Fiona Campbell
8a6813c938 Merge "Simplify BrightnessSynchronizer" 2020-08-07 10:22:37 +00:00
Hongwei Wang
6014caf1ed Move ProtoLog to shared place
Designed to work with both WM and WM-Shell
- source code is moved to com.android.internal.protolog, on contrast,
  com.android.internal.logging is mainly used for uieventlogger
- the protolog-lib is defined in frameworks/base/Android.bp, similar to
  uieventloggerlib as well
- to include protolog, reference what's in services/core/Android.bp

See also go/protolog-migration-s

Bug: 161561475
Test: atest ProtoLogImplTest \
            ProtoLogViewerConfigReaderTest \
            WmTests:ProtoLogIntegrationTest \
            LogDataTypeTest \
            protologtool-tests
Change-Id: I249a5675527d54778ac01529b4cb39fb09cb5d59
2020-08-06 20:36:22 -07:00
Susi Kharraz-Post
6eb59aa87e Fix argument order in Sharesheet Started logging
Argument order for westworld logging number of direct and app targets
provided by the app got turned around in the function call. Fixing the
order by moving the lines

Bug: 162982477
Test: manual
Change-Id: I23d0d2861c169b8e6eb26ce3040913db42f3e01f
2020-08-06 15:08:31 -04:00
Dmitri Plotnikov
38daff3ce2 Add binder call stats tracking for individual UID
Test: $ adb shell cmd binder_calls_stats --work-source-uid <UID>
followed by
$ adb shell dumpsys binder_calls_stats
or
$ adb shell dumpsys binder_calls_stats --work-source-uid <UID>

Change-Id: I8e7d8d4b50b4bd068ad13cbdc75bd87b8c25e7a6
2020-08-05 17:33:43 -07:00
Zhen Zhang
201e1d41bd Merge "Fix bug: NullPointerException in ChooserActivity" into rvc-qpr-dev am: b0c1ac5b2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12317069

Change-Id: I6e3d25d70fdcd2e7083199eb7b1a59d35bc41de2
2020-08-05 21:44:25 +00:00
Hongwei Wang
01b7a61338 Migrate PiP logs to UiEvent
Per go/uievent, migrated PiP logs to UiEvent and also in this change
- Deprecates counterpart proto definitions in metrics_constants
- Record PiP logs from SysUI only, deprecates what's used to be in WM

Changes to the actual logging
- No longer logs the actual aspect ratio
- Disables logging the change of aspect ratio since there are flood of
  events can trigger this
- Splits menu visibility log to SHOW_MENU and HIDE_MENU
- Splits removal of PiP to TAP_TO_REMOVE and DRAG_TO_REMOVE
- No longer logs supportsEnterPipOnTaskSwitch
- Adds new RESIZE logging

Bug: 147508020
Test: $ANDROID_HOST_OUT/bin/statsd_testdrive -terse 90
Merged-In: I805d16ae6f30c07270b743f7ae1e66cbbd121131
Change-Id: I805d16ae6f30c07270b743f7ae1e66cbbd121131
2020-08-05 13:42:16 -07:00
Fabian Kozynski
70f3600c5c Merge "Separate mic + camera from location" 2020-08-05 20:39:05 +00:00
TreeHugger Robot
127fa988aa Merge "Fix bug: NullPointerException in ChooserActivity" 2020-08-05 20:03:46 +00:00