Commit Graph

16538 Commits

Author SHA1 Message Date
TreeHugger Robot
339650b132 Merge "Statsd implementation of puller API" 2019-11-20 00:26:50 +00:00
Tyler Gunn
18325cf2d4 Merge "Add prioritized enableCarMode API in UiModeManager" 2019-11-19 23:16:33 +00:00
Tej Singh
6a5c94364c Statsd implementation of puller API
Internal implementation of the puller API. Registers pullers by putting
them in the kAllPullAtomInfo map. Implements the actual pull,
with condition variables to timeout.

Lastly, keys the kAllPullAtom info by a PullerKey, which is a uid and
atom id. However, the uid is just set to a default of -1 for now. I will
work the security implementation in a follow up CL.
Test: builds, boots
Test: I will write unit tests in the future. It's very difficult to
write any without StatsEvent being completed.

Change-Id: Id602dd297b6ba7df811e2d5ab2e77efc0684e418
2019-11-19 14:32:49 -08:00
TreeHugger Robot
9d0b195b73 Merge "Add multiuser support for notification history" 2019-11-19 20:20:28 +00:00
Julia Reynolds
a614c279f5 Add multiuser support for notification history
Since the data is stored in user encrypted storage,
we need an intermediate layer that can manage the per user
databases

Test: atest
Bug: 137396965
Change-Id: I66b6f830b3109e0df34d4bb95e32e5c035d0adac
2019-11-19 12:10:55 -05:00
Bernardo Rufino
a229e8f1c1 Merge "Revert "Block background custom toasts"" 2019-11-19 16:29:44 +00:00
Bernardo Rufino
15fecc3662 Revert "Block background custom toasts"
This reverts commit 880cf32c70.

Reason for revert: Broke CtsWindowManagerDeviceTestCases ToastTest.testToastIsNotClickable()

Change-Id: Ia108eeee81b673306d0e552e01d18e1558a00dd8
2019-11-19 16:25:20 +00:00
Artur Satayev
785d3a03b9 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Bernardo Rufino
f2e1609f54 Merge "Block background custom toasts" 2019-11-19 11:18:48 +00:00
Ilya Matyukhin
d6b829939a Merge "Implemented and integrated AuthService" 2019-11-19 02:03:13 +00:00
Kevin Hufnagle
3a6d75b315 Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev am: 1ec7235ebe am: c54b10fa62 am: 0f18e3444e
am: e666b2aea4

Change-Id: I590eb6e852443b1f6e0ba83a29c123fa92873dda
2019-11-18 14:20:03 -08:00
Kevin Hufnagle
e666b2aea4 Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev am: 1ec7235ebe am: c54b10fa62
am: 0f18e3444e

Change-Id: Idcfa371367282b880141cb4307e804f5fcd56c14
2019-11-18 14:14:12 -08:00
Ilya Matyukhin
e4675b3067 Implemented and integrated AuthService
AuthService in its current form is a thin wrapper around
BiometricService. It initializes BiometricService in onStart();
registers fingerprint, face, and iris authenticators; and forwards all
of the incoming calls to the corresponding methonds in BiometricService.

The next step will be to move non-biometric related functionality from
BiometricService to AuthService, and turn BiometricService into a module
with a stable API.

Bug: 141025588
Test: atest AuthServiceTest
Test: atest BiometricServiceTest
Test: BiometricPrompt works in BiometricPromptDemo
Change-Id: Ia861b7c2d80bfca386c3e0b44ec35b4aca3b0ffc
2019-11-18 22:10:50 +00:00
Kevin Hufnagle
0f18e3444e Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev am: 1ec7235ebe
am: c54b10fa62

Change-Id: I60ce7afd84eae7b1c297e6cc0f246680d84f5cc0
2019-11-18 14:10:11 -08:00
Suprabh Shukla
13339167ec Merge "Remove cancel listeners from pending intent alarms" into qt-qpr1-dev
am: c2ce0ac905

Change-Id: Ibd4275ef993f7b4b77e15212194b58bef2af9e1c
2019-11-18 14:06:14 -08:00
Kevin Hufnagle
c54b10fa62 Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev
am: 1ec7235ebe

Change-Id: Iec60117a620bf655859555e8d5e3bc028e73b8a0
2019-11-18 14:06:10 -08:00
Beverly
435f8cb618 Merge "Update equals and hashCode methods of NoMan.Policy" am: e3d6061a67
am: e9e1e8290a

Change-Id: I75da768cc6b9178ea9fa9a4c37940fbd48321517
2019-11-18 13:59:28 -08:00
Beverly
e9e1e8290a Merge "Update equals and hashCode methods of NoMan.Policy"
am: e3d6061a67

Change-Id: I723e70a5e6c856ecd693d9b6eb8c592303fe9f11
2019-11-18 13:53:33 -08:00
Kevin Hufnagle
1ec7235ebe Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev 2019-11-18 21:47:10 +00:00
Treehugger Robot
e3d6061a67 Merge "Update equals and hashCode methods of NoMan.Policy" 2019-11-18 21:05:15 +00:00
Tyler Gunn
daef668a99 Add prioritized enableCarMode API in UiModeManager
Per design doc (go/android-car-mode-design), added new system API to
enable car mode and specify a priority for the calling app.
Also modified UiModeManager to pass the package name of the caller to
UiModeManagerService.

Bug: 136109592
Test: Added new unit tests and CTS tests.
Test: Added Telecom test app functionality to verify.
Change-Id: I2848039c9ea18ba93e7694e04c4e5dc70759daa3
2019-11-18 13:03:30 -08:00
Chen Xu
501d21c629 Merge "add a new telephony protection level" am: cd953e939f
am: 2d98a66b18

Change-Id: Ie07cbd4d8c8350668a5d534fef9f1bd4863e43ab
2019-11-18 11:18:57 -08:00
Chen Xu
2d98a66b18 Merge "add a new telephony protection level"
am: cd953e939f

Change-Id: Ie275baf92a865fe1dc5855b00e49944d2598e4b4
2019-11-18 11:16:00 -08:00
TreeHugger Robot
82865f85c1 Merge "Pipe featureId from app to noteOp for WallpaperMgr" 2019-11-18 19:01:35 +00:00
Beverly
3fe3e8195a Update equals and hashCode methods of NoMan.Policy
Test: atest AudioManagerTest#testPriorityOnlyChannelsCanBypassDnd
Fixes: 142643922
Change-Id: I15835f784ba73b40eccf92a0a430905d28647669
Merged-In: I15835f784ba73b40eccf92a0a430905d28647669
(cherry picked from commit 4f8b0224e1)
2019-11-18 13:55:43 -05:00
Makoto Onuki
b8cf86a2ca Merge "Clean up system service registration. (2nd try)" 2019-11-18 17:22:13 +00:00
Bernardo Rufino
880cf32c70 Block background custom toasts
To assess app compatibility problems early on, this CL blocks background
custom toasts in a non-secure way. We create a new method in the AIDL called
enqueueTextToast() that now contain the same parameters as
enqueueToast(), receiving the view created inside the app's process. But this
method will, in the future, contain a CharSequence instead of
ITransientNotification, for window creation inside the system.

We use PlatformCompat infrastructure to check if the change is enabled.

I learned with this change that if user blocks notifications for an app, it
won't be able to show background toasts, allowing me to re-use the foreground
check that was already in place.

This change will display a text toast (from the system) in case the app's
custom toast gets blocked, this is temporary to get feedback from
dogfood.

Test: With sample app targeting SDK 29, verify that:
      1. Posting text toast in bg works
      2. Posting custom toast in fg works
      3. Posting custom toast in bg does NOT work
Test: With sample app targeting SDK 28, verify that 1, 2 and 3 above work.
Test: Working on CTS
Bug: 128611929
Change-Id: Icecbbeff081fa5e7c4329bf3b383d6859520b517
2019-11-18 15:45:41 +00:00
Chen Xu
da02e07b92 add a new telephony protection level
for oems which take telephony mainline module, all telephony related
apks will be signed with non-platform certificate. that said apks won't
be able to grant platform signature permission. Solution is to add a new
telephony protection level.

Bug: 141479803
Test: cts & manual
Change-Id: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
(cherry picked from commit 45c183d201)
Merged-in: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
2019-11-17 17:49:41 -08:00
Philip P. Moltmann
41ff0f6724 Pipe featureId from app to noteOp for WallpaperMgr
Test: atest CtsAppOpsTestCases(now includes canary test for this flow)
Bug: 136595429
Change-Id: I5f309646286cc4f3e080b87f482199fface67370
2019-11-15 20:09:13 -08:00
Evan Rosky
0740566355 Merge "Include IWindowContainer token along with StackInfo" 2019-11-15 22:56:31 +00:00
Makoto Onuki
05b14f53a5 Clean up system service registration. (2nd try)
Bug: 143788029
Test: boot
Test: build/soong/soong_ui.bash --make-mode dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
(This build uses java 8, which caused a build failure at the first try)

Test: atest SystemUITests

Change-Id: I352df4e76c9a2e787c9b4216b26d8d5fc84ff369
2019-11-15 13:39:20 -08:00
Kevin Hufnagle
496c0bae14 docs: Updated desc. of lockNow() method and its overload
Explains in more complete detail who should call lockNow(), when to call the method,
and what happens when there's no lock set on a device.

Test: make ds-docs -j32

Bug: 28831838
Change-Id: I5acc0cbfa63dffe8676e8b60476b584fd43b5bde
2019-11-15 19:44:11 +00:00
Adam Bookatz
b9a57da94c Merge "Introduce user types" 2019-11-15 19:15:37 +00:00
Charles Munger
77c54b3a33 Merge "Deprecate AliasActivity" am: 95b815e26e am: 66f56ac1e8
am: 23220f2726

Change-Id: I5f47c62422441997eacc57856ffa1bc43a778660
2019-11-15 11:11:58 -08:00
Jayachandran Chinnakkannu
5fc195c56e Merge "Remove exposing of ImsManager and RcsMessageManager in system service registery" am: ad648ffc9d am: f3b4fc4dac
am: 3db90e00b0

Change-Id: I4be3eafc38caf7e225bb4bde649c00fe81d85482
2019-11-15 11:09:45 -08:00
Charles Munger
23220f2726 Merge "Deprecate AliasActivity" am: 95b815e26e
am: 66f56ac1e8

Change-Id: I0bcc4914246bac2fe28808bc8a4873550dadbb80
2019-11-15 11:05:42 -08:00
Jayachandran Chinnakkannu
3db90e00b0 Merge "Remove exposing of ImsManager and RcsMessageManager in system service registery" am: ad648ffc9d
am: f3b4fc4dac

Change-Id: I628ab104b1167d8261bcd8fa541287ce790d18d6
2019-11-15 11:01:49 -08:00
Charles Munger
66f56ac1e8 Merge "Deprecate AliasActivity"
am: 95b815e26e

Change-Id: I9013bd8596ba35bbdaa1e2657c0416f1690a37dc
2019-11-15 10:58:06 -08:00
Jayachandran Chinnakkannu
f3b4fc4dac Merge "Remove exposing of ImsManager and RcsMessageManager in system service registery"
am: ad648ffc9d

Change-Id: I9eaf4c5935f69d12ff25fa4d8ac8cc7ec05d591a
2019-11-15 10:50:57 -08:00
Treehugger Robot
95b815e26e Merge "Deprecate AliasActivity" 2019-11-15 18:38:35 +00:00
Jayachandran C
c01f4eda35 Remove exposing of ImsManager and RcsMessageManager in system service registery
Since these are hidden it cannot be accessed by system service registery
Removing it for now and can be added later when these becomes SystemApi

Bug: 140768340
Test: Build & basic sanity
Change-Id: Ibb007f0a761bcbd006ebffbb552d0da82b586d03
2019-11-15 18:10:54 +00:00
Evan Rosky
282ee67dd7 Include IWindowContainer token along with StackInfo
This is needed for stacks to participate in transactions.
Most immediate use-case will be PiP during rotation

Bug: 119687367
Test: Added ActivityTaskManagerServiceTests#testStackTransaction

Change-Id: I50a5c3cea4f23f2be4e55ba38f8a5371fa9dfe79
2019-11-14 12:52:28 -08:00
TreeHugger Robot
9f43c201fe Merge "Do not look for R.class of overlays" 2019-11-14 19:04:48 +00:00
Bookatz
029832a951 Introduce user types
Introduces the notion of 'user types' to UserManager.
Previously, users only had properties, set by UserInfo flags. We now
solidify some of these as formal user types. Each user must be of
precisely one user type. The configuration of each type is defined
in a UserTypeDetails object.

Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and
'normal' - that were set via UserInfo flags are now controlled via
UserType. Previous UserInfo flag methods for categorizing these are
still supported as long as no user of of more than one type.

If a user was (e.g.) previously both Guest and Demo, it is now
invalid and will be prevented from upgrading. This should not be a
problem in AOSP, where these 'types' were assumed mutually exclusive.

UserTypeDetails is sufficiently general to support future non-managed
profiles. To this end, the logic for specifying badges and their
colors/labels is contained by UserTypeDetails, and therefore
UserManager is responsible for delivering the corresponding badge
information.

Bug: 142151520

Test: added new test class UserManagerServiceUserTypeTest
Test: added additional tests in UserManagerServiceUserInfoTest
Test: added additional tests in UserManagerTest
Test: added additional tests in UserManagerServiceCreateProfileTest
Test: created UserTests to run the various pm.User*Test's

Test: atest \
  com.android.server.pm.UserTests \
  UserLifecycleTests \
  ManagedUserContentResolverTest \
  CtsDevicePolicyManagerTestCases \
  CtsMultiUserHostTestCases \
  com.android.server.devicepolicy.DevicePolicyManagerTest \
  com.android.server.am.UserControllerTest \
  CreateManagedProfileTaskTest

Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest
   using adb shell getprop persist.sys.max_profiles # for 5 and -1

Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
2019-11-14 10:00:50 -08:00
Makoto Onuki
57c99d3a2f Merge "Revert "Clean up system service registration."" 2019-11-14 02:28:26 +00:00
Makoto Onuki
202fd24765 Revert "Clean up system service registration."
This reverts commit a9f2224068.

Reason for revert: broke build

Change-Id: I08d1e3b6f7f02627138ff3f50b436772e1eb756f
Fixes: 144460136
2019-11-14 02:25:11 +00:00
Makoto Onuki
3212ad0167 Merge "Clean up system service registration." 2019-11-14 00:14:22 +00:00
Suprabh Shukla
c8e1162852 Remove cancel listeners from pending intent alarms
The cancel listeners are created per PendingIntent instance and were
spamming the callback list stored inside PendingIntentRecord. In cases
where there is even a single live PendingIntent backed by this
PendingIntentRecord, all PendingIntent instances backed by this
PendingIntentRecord for which a callback was ever registered will leak.

Test: atest FrameworksMockingServicesTests:\
com.android.server.am.PendingIntentControllerTest
atest FrameworksMockingServicesTests:\
com.android.server.AlarmManagerServiceTest

Bug: 143091024
Change-Id: I65df12da0c437064e6e3719911926738c677c4eb
Merged-In: I65df12da0c437064e6e3719911926738c677c4eb
(cherry picked from commit 0d51a8bcc0)
2019-11-14 00:02:06 +00:00
Ryan Mitchell
73bfe41bab Do not look for R.class of overlays
Now that RROs are loaded as shared libraries,
LoadedApk#makeApplication is attempting to find the onResourcesLoaded
method of the overlays. This is a performance hit and causes more
memory than necessary to be allocated during application start up.

Bug: 143314947
Test: com.android.performance.tests.HermeticMemoryTest
Change-Id: I3b8cd22dae83e0164d6678c80279f9fffceb34e6
2019-11-13 14:51:14 -08:00