Commit Graph

12456 Commits

Author SHA1 Message Date
Antoan Angelov
f68bf1a819 Merge "Add metadata to validate incoming administrator during transfer of ownership." 2018-01-17 21:32:15 +00:00
Craig Donner
022320cb57 Merge "Deprecate android.software.vr.mode" 2018-01-17 20:20:51 +00:00
TreeHugger Robot
3fb6ea960f Merge "Add BackupManager#isBackupServiceActive() system API" 2018-01-17 19:07:21 +00:00
TreeHugger Robot
13e7ad1e1c Merge changes from topics "SliceDesc", "SliceCleanup"
* changes:
  Add SliceManager#getSliceDescendants
  Update slice APIs
2018-01-17 18:58:27 +00:00
TreeHugger Robot
4ba2c3f4ec Merge "Ensure a user's SP does't change." 2018-01-17 18:08:45 +00:00
Jorim Jaggi
7e269fca40 Merge changes from topic "remote_animations"
* changes:
  Remote animations (app-controlled animations)
  Defer hiding clients until animation is done
2018-01-17 15:59:52 +00:00
Michal Karpinski
96e0be0fd8 Add BackupManager#isBackupServiceActive() system API
So that GMSCore can find out and disable restore flow
and Backup UI.

Bug: 33339643
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.DeviceOwnerTest#testBackupServiceActive (new GTS test in companion CL)
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testBackupServiceEnabling
Change-Id: I62c38dec2395d3aa926566d128b0067ce7d62c26
2018-01-17 15:00:45 +00:00
Alex Chau
4f46813ebc Merge "API Review: Put executor argument before the listener argument for clearApplicationUserData" 2018-01-17 14:46:03 +00:00
arangelov
5149d716e5 Add metadata to validate incoming administrator during transfer of ownership.
Bug: 69543092
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedDeviceOwnerHostSideTransferTest#testTransfer
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedDeviceOwnerHostSideTransferTest#testTransferNoMetadata
Change-Id: Iccefb37836d0f88e9d4f692ecf9aba6d3197ad08
2018-01-17 14:31:19 +00:00
Jorim Jaggi
33a701a55c Remote animations (app-controlled animations)
Adds the ability for another app to control an entire app
transition. It does so by creating an ActivityOptions object that
contains a RemoteAnimationAdapter object that describes how the
animation should be run: Along of some meta-data, this object
contains a callback that gets invoked from WM when the transition
is ready to be started.

Window manager supplies a list of RemoteAnimationApps into the
callback. Each app contains information about the app as well as
the animation leash. The controlling app can modify the leash like
any other surface, including the possibility to synchronize
updating the leash's surface properties with a frame to be drawn
using the Transaction.deferUntil API.

When the animation is done, the app can invoke the finished
callback to get WM out of the animating state, which will also
clean up any closing apps.

We use a timeout of 2000ms such that a buggy controlling app can
not break window manager forever (duration subject to change).

Test: go/wm-smoke
Test: RemoteAnimationControllerTest

Bug: 64674361
Change-Id: I34e0c9a91b28badebac74896f95c6390f1b947ab
2018-01-17 15:12:19 +01:00
Craig Donner
c6f9c85f74 Deprecate android.software.vr.mode
Bug: 71365436
Test: Build
Change-Id: I4e371dfea1823787e2e175206b34c25d872bd411
2018-01-16 16:00:42 -08:00
Makoto Onuki
13ccf0b951 Merge "Log sync stop (== onStopJob) reason in the sync log." 2018-01-16 23:04:15 +00:00
Jason Monk
5f8cc27e14 Add SliceManager#getSliceDescendants
Allows SliceProviders to give consumers a list of slices they might
be interested in.

Test: cts
Bug: 68378569
Change-Id: I2d7d50388055937cabe3378502db56201f051897
2018-01-16 17:57:20 -05:00
Jason Monk
b9e06a8458 Update slice APIs
- Remove deprecated onBindSlice
 - Move bindSlice to SliceManager since it exists.

Test: update-api
Bug: 68378571
Change-Id: I1bfde10b5da5f80d395c69a6408fa5b13cd113f0
2018-01-16 17:12:06 -05:00
Lenka Trochtova
c141d08b70 New management API for making backups mandatory.
Let the device owner make backups with a chosen backup
transport mandatory.

BUG: 64012357
Test: make RunFrameworksServicesRoboTests
Test: manually together with the corresponding GmsCore change.
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test
com.android.cts.devicepolicy.DeviceOwnerTest#testGetAndSetMandatoryBackupTransport
Test: cts-tradefed run cts -m CtsBackupHostTestCase --test
android.cts.backup.BackupDeviceOwnerHostSideTest#testMandatoryBackupTransport

Change-Id: I9bfae5799beae3459659e697813b75a9b508ae55
2018-01-16 22:24:11 +01:00
Makoto Onuki
d2bfec6359 Log sync stop (== onStopJob) reason in the sync log.
Bug: 71866667
Test: Manual test

Change-Id: I89e492362759fe6318102b61a28818b642f5bc2f
2018-01-16 20:47:24 +00:00
Andreas Gampe
e8e016838a Merge "ActivityThread: Attempt to attach agent with app's classloader" am: f779d7e3be am: 9f1f950c31
am: 9853a65386

Change-Id: I064033ab86013dd80efa3cb4eb22b89ac143e7b6
2018-01-16 20:08:30 +00:00
Andreas Gampe
9853a65386 Merge "ActivityThread: Attempt to attach agent with app's classloader" am: f779d7e3be
am: 9f1f950c31

Change-Id: I0df113aff5a54c5a1dbc5f968679bb9d4f8ea158
2018-01-16 19:59:02 +00:00
Andreas Gampe
9f1f950c31 Merge "ActivityThread: Attempt to attach agent with app's classloader"
am: f779d7e3be

Change-Id: Id5ae3b90ca4b75046419fb1a6c02ef556d225f77
2018-01-16 19:46:36 +00:00
Andrew Scull
1416bd022f Ensure a user's SP does't change.
Changes of the SP are caused by untrusted credential reset which can be
triggered by certain admin modes. When such an admin is active, the SP
needs to be cached. Untrusted reset will be removed in a future release
at which point this caching can also be removed.

Bug: 71527305
Test: runtest frameworks-services -p com.android.server.locksettings
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy
Change-Id: I54f3b299b79ce019ba679b5550d37fd090b679fb
2018-01-16 18:14:23 +00:00
Naomi Musgrave
ff350a2f35 Merge "Include ID in toString of NetworkEvent subclasses, DNS and Connect event" 2018-01-16 15:00:38 +00:00
Oscar Key
0158d976c8 Merge "Add FLAG_INCREMENTAL and FLAG_NON_INCREMENTAL to performBackup()." 2018-01-16 11:17:00 +00:00
Andreas Gampe
ab8a63be6a ActivityThread: Attempt to attach agent with app's classloader
Try to use the app's (main) classloader when an attach-agent request
is handled. If that fails, retry without a classloader.

Add bind-application-time flag to ProfilerInfo. Use the flag to have
a second attach-agent point on app startup. Add --attach-agent-bind
to cmd activity start to expose the difference between pre-bind and
bind-time attaching.

Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I21698ec3be43a6d095d577100b2adfb22daca7d5
2018-01-15 13:04:25 -08:00
Oscar Key
7b1d974d71 Add FLAG_INCREMENTAL and FLAG_NON_INCREMENTAL to performBackup().
These indicate if backup manager passed any previous state to the backup
agent when building a backup. The transport will use these to decide
whether to clear any existing encryption related state for the app.

I left the new flags as @hide for now.

Bug: b/71792427
Test: Tested manually with a buid of GmsCore updated to process the new
flag. I am attempting to write a robolectric test.

Change-Id: Ica0f6f578cd7d1ad29af532a45a2ee6685c84747
2018-01-15 18:22:29 +00:00
Alex Chau
4a4285bb5f API Review: Put executor argument before the listener argument for clearApplicationUserData
Bug: 71866615
Test: None (No change in IDevicePolicyManager)
Change-Id: I81eb6faf4948d1b230bdb7b9fe97d0764effa531
2018-01-15 14:06:56 +00:00
TreeHugger Robot
23374d63ec Merge "Move startUserInBackground to standalone and avoid user from being stopped unnecessarily" 2018-01-15 13:56:36 +00:00
TreeHugger Robot
82548f4bc3 Merge "Implement DISALLOW_SHARE_INTO_MANAGED_PROFILE" 2018-01-13 16:40:41 +00:00
Lucas Dupin
e1daf52b92 Merge "Allow custom keyguard "prompt reason"" 2018-01-13 01:13:26 +00:00
TreeHugger Robot
bc569cb25c Merge "Fix object pool for lifecycler" 2018-01-12 23:27:55 +00:00
Jeff Hamilton
2fd131b492 Merge "Minor LoadedApk refactoring." am: 6ca155f8c2
am: e6fee297a2

Change-Id: I919f7e7e11b64f6155919f7ea631f3f6fd84ce03
2018-01-12 21:43:44 +00:00
Jeff Hamilton
e6fee297a2 Merge "Minor LoadedApk refactoring."
am: 6ca155f8c2

Change-Id: I96fb0215bc09e2c190900be47dcca4de2c752d47
2018-01-12 21:30:13 +00:00
Kodlee Yin
d6ae867fb2 Merge "Create Notification.Action.SemanticAction intdef." 2018-01-12 21:20:54 +00:00
Andrii Kulian
0447068f27 Fix object pool for lifecycler
The original implementation of object pool for lifecycle
transactions tried to always recycle objects after a
transaction was scheduled. In case when a client was running
in the same process this lead to objects being emptied before
it could actually perform the transaction.
Also when checking if object was already in the pool we should
use "==" instead of equality check.

Bug: 70554032
Bug: 71346774
Test: com.android.server.am.ClientLifecycleManagerTests
Test: android.app.servertransaction.ObjectPoolTests
Change-Id: I85fb3dae4589c2390e00a37144da0d285d16d151
2018-01-12 13:08:25 -08:00
Jeff Hamilton
caf728ea26 Minor LoadedApk refactoring.
- Rename varaibles holding LoadedApk to make the code easier to read.
- Move resource creation into LoadedApk, consolidating the logic.

(cherry picked from commit 7541ca4d1a)

Test: manual
Merged-In: I6bdc70482fbbb346ff694ada528ded18d3a63ef7
Change-Id: I6bdc70482fbbb346ff694ada528ded18d3a63ef7
2018-01-12 11:05:50 -08:00
Rubin Xu
cc391c2c13 Implement DISALLOW_SHARE_INTO_MANAGED_PROFILE
Add a user restriction to allow profile owners to enforce a stronger
isolation of managed profile by preventing users sharing data into
the profile. This is achieved by disabling a subset of built-in cross
profile intent filters added by ManagedProvisioning during profile
inflation.

Implementation wise, DevicePolicyManagerService listens for the restriction
change and notifies ManagedProvisioning to modify the built-in intent
filters. This is needed since ManagedProvisioning has ground truth of all
built-in intent filters and manages them. It also has the advantage that
ManagedProvisioning only needs to run when a policy change happens.

Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testDisallowSharingIntoProfileFromPersonal
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testDisallowSharingIntoProfileFromProfile
Bug: 63911046
Change-Id: Ia6d12a5086627d1280325cd19d6e3a0752dae633
2018-01-12 19:01:40 +00:00
Kodlee Yin
c72c44d90d Create Notification.Action.SemanticAction intdef.
Currently, Notification.Action has no indication of what it will do
when the associated PendingIntent is triggered. SemanticAction will
allow app developers to specify what the Action will do. This is
useful, for example, in the case where a user wants to answer an
incoming message in a hands-free manor. As, potentially, the
Notification may contain multiple actions like Reply, Mark as Read,
etc, this hands-free application would need to differentiate the
reply Action from the Mark as Read action. SemanticAction would
provide a means to do so.

Test: runtest -x
core/tests/coretests/src/android/app/NotificationTest.java
Bug: 67717177
Bug: 70859253
Change-Id: I8179afdd5da77be0037a8c03e125d8178cecc568
2018-01-12 10:23:27 -08:00
Naomi Musgrave
10ae748da6 Include ID in toString of NetworkEvent subclasses, DNS and Connect event
Bug: 63910201

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Change-Id: Ie57bc09732e3e3d9f67eee3e8cfe8f5b5f9ecf73
2018-01-12 17:21:38 +00:00
Alex Chau
b6ef86985d Move startUserInBackground to standalone and avoid user from being stopped unnecessarily
- Removed START_USER_IN_BACKGROUND in createAndMaangeUser
- Added startUserInBackground that can return whether user is started. It checks for whether more users can be started without stopping existing users.
- Added canStartMoreUsers in UserController and ActivityManagerService
- Updated javadoc of a few user management API in DevicePolicyManager
- In UserController.startUser, return false if maximum running user limit is reached when starting user in background
- Only stop guest or ephemeral user that is being switched out in stopGuestOrEphemeralUserIfBackground

Bug: 71694116
Test: Create 3 ephemeral users, can startUserInBackground for first two but failed for the third.
Test: Switch to first user, second user is not affected.
Test: Switch out first user, second and third user is not affected. Can startUserInBackground for third user at this point.
Change-Id: I46aa1d8788851b10b5b169ac656cb982791de479
2018-01-12 15:07:22 +00:00
Andreas Gampe
4b5a9ce6b3 Merge "Frameworks: Move SharedPreferencesImpl to tristate" am: 5edae415b0 am: 75dc3e9cf4
am: 07903b8ded

Change-Id: Idbfd80b32c27cfd2d24b37b5b868820e6ed7a283
2018-01-12 02:58:14 +00:00
Andreas Gampe
07903b8ded Merge "Frameworks: Move SharedPreferencesImpl to tristate" am: 5edae415b0
am: 75dc3e9cf4

Change-Id: Ifbe406bda739b3689ca9ed95493a8eca7a9276ae
2018-01-12 02:42:43 +00:00
Andreas Gampe
75dc3e9cf4 Merge "Frameworks: Move SharedPreferencesImpl to tristate"
am: 5edae415b0

Change-Id: Idef313e1a0c1a69434783da2441a84aa6e12409e
2018-01-12 02:32:15 +00:00
Treehugger Robot
5edae415b0 Merge "Frameworks: Move SharedPreferencesImpl to tristate" 2018-01-11 23:52:46 +00:00
Jerry Zhang
68ad3d119c Merge "DO NOT MERGE: Add ScreenObserver" 2018-01-11 23:50:34 +00:00
Holly Jiuyu Sun
613e01227b Merge "Add EuiccCardManager and EuiccCardController." am: ec25ea1520
am: edc14bd3c4

Change-Id: I5ac16981ac7ca4d492387a340f10a34b8ab1d804
2018-01-11 23:11:05 +00:00
TreeHugger Robot
0b2249786f Merge "Move A11y events throttling away from View(RootImpl)" 2018-01-11 22:57:35 +00:00
Ben Gruver
c4a5b5010f Merge "Implement harmful app warning at activity launch" 2018-01-11 22:20:38 +00:00
Lucas Dupin
c80c67e7bc Allow custom keyguard "prompt reason"
Adds the possibility of presenting a custom message on
the keyboard if you're trying to dismiss the keyguard.

This is particularly useful when you're showing the
bouncer because custom authentication (SmarLock)
failed.

Test: launch FLAG_SHOW_WHEN_LOCKED activity and
      call KeyguardManager#requestDismissKeyguard
Fixes: 63940122
Change-Id: I0d88c0e59521887efa56d74874062b2b14970e4e
2018-01-11 13:15:31 -08:00
Ben Gruver
1ab3d6e56b Implement harmful app warning at activity launch
Bug: 63909431
Test: manual

Change-Id: I8a5497421cb8130af8cdd5129b0f6e1707a01e36
2018-01-11 12:13:29 -08:00
Jerry Zhang
1b4b3c4e9b DO NOT MERGE: Add ScreenObserver
ScreenObserver allows system components to
monitor the screen lock state.

Bug: 68054513
Test: manual
Change-Id: I50f4690f68443f676d17e93efb1b7cb0857abd9e
2018-01-11 19:38:27 +00:00
Sudheer Shanka
5b9f065754 Merge "Update DPMS to push active admins info to UsageStatsService." 2018-01-11 18:45:15 +00:00