Commit Graph

16308 Commits

Author SHA1 Message Date
Elliott Hughes
b43a2eacba Merge "Remove a user/userdebug difference." am: 363a602bd1 am: 47991c1b07 am: df703bcdf2
am: 593650f907

Change-Id: I7d777426c71a6b623c5957d287f1aa75afdd2afe
2019-10-03 12:49:54 -07:00
Elliott Hughes
593650f907 Merge "Remove a user/userdebug difference." am: 363a602bd1 am: 47991c1b07
am: df703bcdf2

Change-Id: I5b41fb959df5c8ea1585aec9eebeac037e0885d8
2019-10-03 12:37:16 -07:00
Elliott Hughes
df703bcdf2 Merge "Remove a user/userdebug difference." am: 363a602bd1
am: 47991c1b07

Change-Id: I67b907540790306ff3b8ee1fc23ff9c6787dbf8c
2019-10-03 12:21:45 -07:00
Elliott Hughes
47991c1b07 Merge "Remove a user/userdebug difference."
am: 363a602bd1

Change-Id: I6b3287ca1b534f71abbdd652065a536b0a912a50
2019-10-03 12:14:30 -07:00
Elliott Hughes
e14fa97af9 Remove a user/userdebug difference.
There isn't much users can do to get app developers to care anyway, so
leaving this on just for apps with debuggable="true" should be
sufficient.

Bug: http://b/141754375
Test: treehugger
Change-Id: I3a796f9c4b9358fce499649c3f289e956ee9a97a
2019-10-02 11:40:03 -07:00
Mark Renouf
817d014bf0 Merge "Support frame-synchronized clipping on SurfaceView" 2019-10-02 15:03:15 +00:00
Adam He
1fa3acc02f Merge "Allow empty scheme in setWebDomain()." 2019-10-01 21:22:27 +00:00
TreeHugger Robot
c087fbc6f4 Merge "View attr debug: avoid 'Invalid ID 0x00000000'" 2019-10-01 07:08:40 +00:00
TreeHugger Robot
0617359e5a Merge "Allowing more than one app to suspend apps" 2019-09-30 22:43:18 +00:00
Abhijeet Kaur
74ccee9f23 Merge "Use bugreport mode enums from BugreportParams" 2019-09-30 13:42:41 +00:00
TreeHugger Robot
312565f1be Merge "Stop LockSettingsService from calling DevicePolicyManager directly" 2019-09-28 04:49:43 +00:00
Abhijeet Kaur
bcb384b95a Use bugreport mode enums from BugreportParams
All callers of requestBugReport(enum) have been migrated to use
wrappers, so it's safe to switch the internal enum we use for bugreport
mode from ActivityManager constants to BugreportParams enum.

Note that in requestBugReport() we have been passing ActivityManager
constant enum for INTERACTIVE bugreport, when sending an intent to
Shell, where BugreportPramas enum was expected, but it worked fine
because they had the same value. We can stop relying on that.

Bug: 137825297
Bug: 141355059
Test: Interactive bugreports created successfully
Change-Id: I1ab5d471a6d5c70fcd201719eae90f820e17cb80
2019-09-27 11:05:21 +01:00
atrost
1904bb31ad Merge "Refactor ChangeReporter and rate limit stats logging." am: 9a253e12cc am: 76191fa6b0 am: 604f8002d8
am: 7564285e10

Change-Id: Ib6605757514b90ec5fb2df03f08fc7d48d12e08e
2019-09-26 10:59:12 -07:00
atrost
7564285e10 Merge "Refactor ChangeReporter and rate limit stats logging." am: 9a253e12cc am: 76191fa6b0
am: 604f8002d8

Change-Id: I5ed4a64b701041393026b742bc3f451d73c4ed33
2019-09-26 10:52:39 -07:00
atrost
604f8002d8 Merge "Refactor ChangeReporter and rate limit stats logging." am: 9a253e12cc
am: 76191fa6b0

Change-Id: I8c853fb3e09a83ad877f02132608884cfaba966f
2019-09-26 10:45:54 -07:00
atrost
76191fa6b0 Merge "Refactor ChangeReporter and rate limit stats logging."
am: 9a253e12cc

Change-Id: I33b14641d259efea6bf7038da264a3483e71f955
2019-09-26 10:39:31 -07:00
atrost
6624ffa207 Refactor ChangeReporter and rate limit stats logging.
Only log once per change-package-state(resets every app launch if used
from within the app process).

Next: reset every app launch for server usage as well.

Test: using the test app.
Bug: 138374585
Change-Id: I5587f7138cf2cd8d144e88cf294e65c14bb32bfb
2019-09-26 12:59:19 +01:00
Pavel Grafov
64247a1661 Merge "Throw if admin sets password constraints that have no effect." 2019-09-26 10:55:54 +00:00
TreeHugger Robot
cb364f996f Merge "Notify AutofillManager that activity is finishing on onDestroy()." 2019-09-26 03:49:46 +00:00
Suprabh Shukla
d3278449d7 Allowing more than one app to suspend apps
We want to allow wellbeing apps to suspend in managed profiles.
This requires changing the internal data design of package-suspend
state to allow more than one suspending package, each with their
own parameters, namely - dialog info, app extras and launcher extras.

Also, removed the restriction of using setPackagesSuspendedAsUser when a
PO/DO exists

Test: atest com.android.server.pm.PackageUserStateTest
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.wm.ActivityStartInterceptorTest
atest GtsSuspendAppsTestCases

Bug: 138812320
Change-Id: If1263142fc9e6687e95af9b8d71ba8eff0c0fae9
2019-09-25 17:11:17 -07:00
Lucas Dupin
16a4825807 Merge "Merge "Fix wrong Notification refactor" into qt-qpr1-dev am: 9c743a222d" into qt-qpr1-dev-plus-aosp
am: 33094b44d8

Change-Id: I808e7fb137d8a7e3e7d67235db4adecdb0fc23dc
2019-09-25 15:57:15 -07:00
Lucas Dupin
f43017962e Merge "Fix wrong Notification refactor" into qt-qpr1-dev
am: 9c743a222d

Change-Id: Ia329bece21b35d6379fbed7c72900ec7b0945131
2019-09-25 15:44:58 -07:00
Adam He
323fbe0e55 Allow empty scheme in setWebDomain().
We will supply a default "http://" scheme for URIs without one to the
parser.

Fixes: 140887246
Test: manual verification
Change-Id: Ib580f13fb66885437f99d4935976708523a62d95
2019-09-25 15:06:42 -07:00
Eran Messeri
3acf4a3e2d Merge "API for individual attestation" 2019-09-25 22:02:31 +00:00
TreeHugger Robot
781e42dda4 Merge "Mention singleTask case in Activity#isVoiceInteractionRoot" 2019-09-25 13:37:52 +00:00
Rubin Xu
0f1e56de1f Stop LockSettingsService from calling DevicePolicyManager directly
This is a violation of layering (LSS is considered a lower level
component than DPM) and source of deadlock due to lock inversion.
This change tries to remove most of the direct calls into DPM from
LSS. After this, there will only be a handful non-critical invocations
remaining:
1. DPM.reportPasswordChanged()
   This is always called on a handler thread so it's OK (LSS does not
   hold any hold while calling out). Consider this as a (asynchronous)
   broadcast.
2. DPMi.reportSeparateProfileChallengeChanged()
   This is now moved to the handler thread, similar to
   DPM.reportPasswordChanged().
3. DPMi.canUserHaveUntrustedCredentialReset()
   This is still a violation but it will soon be removed as we
   remove the caching of syhnthetic password alltogether (deprecating
   old resetPassword()). So I'll leave it for now.

Test: atest com.android.server.locksettings
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest MixedDeviceOwnerTest#testResetPasswordWithToken
Bug: 37090873
Bug: 141537958
Change-Id: Ie44cb418ab255bd016c5dd448674beabd362b74c
2019-09-25 10:30:57 +01:00
Lucas Dupin
7b4d885c7c Fix wrong Notification refactor
We're wrongly showing the BigText content after ag/5928752

Fixes: 141446552
Test: post big text notification, look at lock screen
Change-Id: I02506a160afefb457f86eb00adccdaff44ddbd29
2019-09-25 01:05:14 +00:00
Chen Xu
a56786981e Merge "new TelephonyRegistryManager" 2019-09-24 18:32:48 +00:00
Eran Messeri
da05c80d6b API for individual attestation
Introduce a new API to request use of individual attestation
certificate for attesting keys generated by the
DevicePolicyManager.generateKeyPair method.

It builds on existing device ID attestation capabilities in two ways:
(1) Eligibility check: Assuming similar privacy requirements for the use
    of individual attestation certificates, enforce the same conditions
    for using them as the conditions for requesting device identifiers
    in the attestation record.
(2) Keymaster interaction: Passing the right Keymaster tag to the
    attestKey call, which is easily done in AttestationUtils.

Bug: 136494773
Test: CTS test to be added.
Change-Id: Idb5cee66d986a521c17e1955532d0bfae66c035d
2019-09-24 18:14:05 +01:00
Pavel Grafov
26fccb7dce Throw if admin sets password constraints that have no effect.
For admin apps targeting R+, throw when the app sets password requirement
that is not taken into account at  given quality, e.g. when quality is set
to UNSPECIFIED, it doesn't make sense to require certain password length.
If the intent is to require a password of certain length having at least
NUMERIC quality, the admin should first call setPasswordQuality() and only
then call setPasswordMinimumLength().

Conversely when an admin targeting R+ lowers password quality, those
requiremnts that stop making sense, are reset to default values.

+ fix the behaviour of getPasswordMinimumLength to match the docs: only
  admins with password quality >= NUMERIC should be taken into account.

Test: com.android.cts.devicepolicy..MixedDeviceOwnerTest#testResetPasswordWithToken
Test: com.android.cts.devicepolicy.DeviceAdminHostSideTestApi23#testRunDeviceOwnerPasswordTest
Test: com.android.cts.devicepolicy.MixedDeviceOwnerTestApi#testPasswordRequirementsApi
Test: com.android.cts.devicepolicy.MixedDeviceOwnerTestApi25#testPasswordRequirementsApi
Bug: 123562444
Change-Id: Id134a7918718e3b0a220caaf6c672df4238a062c
2019-09-24 16:11:44 +01:00
Philip P. Moltmann
e30ed0599d Merge "Run RuntimePermissionProperty tests when runtime permissions change" 2019-09-24 03:48:06 +00:00
Kevin Hufnagle
909128690a Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev am: 2a082b1e9e am: 096ece8f53 am: 25309b11da
am: 07a467ed78

Change-Id: I4fe698dd4ee7e1c2c3a0993f9cbecda6de0463d1
2019-09-23 16:33:57 -07:00
Kevin Hufnagle
07a467ed78 Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev am: 2a082b1e9e am: 096ece8f53
am: 25309b11da

Change-Id: I2cceed513156c1690124438b48f7a1ae85e7edaf
2019-09-23 16:26:37 -07:00
Kevin Hufnagle
a75d668167 Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev am: 2a082b1e9e
am: 096ece8f53

Change-Id: I9b64cde1a5ad874318feb3e4210f966e774f0f25
2019-09-23 16:24:41 -07:00
Kevin Hufnagle
25309b11da Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev am: 2a082b1e9e
am: 096ece8f53

Change-Id: I03b4f71aaa643e08a661fe383f2cff91c7a136f9
2019-09-23 16:19:39 -07:00
Kevin Hufnagle
096ece8f53 Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev
am: 2a082b1e9e

Change-Id: I74d42b68ebed97c2db3a179e92ba3196ffc7a04f
2019-09-23 16:08:03 -07:00
Kevin Hufnagle
2a082b1e9e Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev 2019-09-23 22:45:45 +00:00
Philip P. Moltmann
de1953f6c9 Merge "Split access-media-storage from read-external-storage" 2019-09-23 21:44:22 +00:00
Chen Xu
288b71c8c1 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
2019-09-22 19:56:39 -07:00
TreeHugger Robot
28d49244b7 Merge "Update PASSWORD_QUALITY_COMPLEX & setPasswordHistoryLength javadocs" 2019-09-21 02:41:20 +00:00
Philip P. Moltmann
2a5ee6ec38 [DO NOT MERGE] Split access-media-storage from read-external-storage
am: ac7b10c135

Change-Id: I50bb8b630a4834314f2a7ff4b78838ca221f7c77
2019-09-20 16:19:56 -07:00
Philip P. Moltmann
0698185471 Merge "[DO NOT MERGE] Split access-media-storage from read-external-storage" into qt-qpr1-dev 2019-09-20 23:09:43 +00:00
TreeHugger Robot
ea2a0eb8f5 Merge "Clear reference to EnterTransitionCoordinator when done" 2019-09-20 22:51:15 +00:00
Philip P. Moltmann
c12ee77b3d Merge "Fix dumpsys for appops proxy field" into qt-qpr1-dev am: 30c48bb54a
am: d69f2f1b97

Change-Id: I75efa3cb1cbd86bd697188e34ae51c75866a44e3
2019-09-20 13:50:46 -07:00
George Mount
785334aeaf Clear reference to EnterTransitionCoordinator when done
Fixes: 141162306

When transitions have completed, the EnterTransitionCoordinator
is no longer needed, so should be cleared so that its references
can be released.

Test: ran code producing the leak
Change-Id: Ia049d88a45dc27b77fcf4ab58a444457a6b87f88
2019-09-20 13:47:35 -07:00
Philip P. Moltmann
d69f2f1b97 Merge "Fix dumpsys for appops proxy field" into qt-qpr1-dev
am: 30c48bb54a

Change-Id: Id521633187bce10f41dce10ba4198bc42e9f363c
2019-09-20 13:41:11 -07:00
Philip P. Moltmann
89b044ffb8 Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

cherry-pick for qt-qpr1-dev Ib9f50d25c002036f13cf2d42fc4d1b214f20920c

Test: - straight cherry-pick
      - atest SplitPermissionTest
Bug: 141048840,140961754
Change-Id: Ia2219639a2104965a382ffef647e5ebaa0f9d540
2019-09-20 10:31:19 -07:00
Philip P. Moltmann
ac7b10c135 [DO NOT MERGE] Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

Test: atest SplitPermissionTest
      m -j gts && gts-tradefed run commandAndExit gts-dev -m GtsPermissionTestCases --test=com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
      Manual testing:
         All combinations of
           - App targetSdk = 28 and 29 (and 22 for extra credit)
           - App having the <uses-permission> tag for
             ACCESS_MEDIA_LOCATION or not
           - Upgrade from P->Q-QPR and from vanilla Q->Q-QPR
         Further upgrade of targetSdk from 28->29 while on Q-QPR
         ==> All permission behavior should make sense. Sometimes there
             are weird, but expected behaviors. Hence we need to
             collect the results and then look at the unexpected ones.
             See SplitPermissionTest for some tests I added for the
             location-background permission which was split from
             the fine/coarse-location permissions
Fixes: 141048840,140961754
Change-Id: Ib9f50d25c002036f13cf2d42fc4d1b214f20920c
2019-09-20 16:45:58 +00:00
Pavel Grafov
d644f5c135 Update PASSWORD_QUALITY_COMPLEX & setPasswordHistoryLength javadocs
* removed the defaults mentioned in PASSWORD_QUALITY_COMPLEX. now it
  refers the reader to setPasswordMinimumXXX docs, where they can find
  information about the default values.
* removed reference to password quality constraints from
  setPasswordMinimumLength docs since it wasn't true and doesn't make
  sense.

Test: compiles
Bug: 138922259
Change-Id: I0b31273846cfb3546d99bd27b1b0174de3d7425a
2019-09-20 15:46:50 +01:00
Dave Mankoff
184c4a86d0 Merge "Ensure that the Application is constructed before any Service." 2019-09-20 13:14:15 +00:00