574 Commits

Author SHA1 Message Date
Jiyong Park
e86e89acff Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ifd6cfc77acf2284804a2f64011c2733b5c222369
(cherry picked from commit bae2e907966dce0cb3eaf3e3a81cca4364b7d941)
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-12-11 15:55:33 +09:00
nathch
0bae181e71 DO NOT MERGE Add stop method to backup handler thread.
am: 842369a82b

Change-Id: Ib339b0e2945d3561aae3afe4f34ab8bb213ecca8
2019-07-24 14:39:27 -07:00
nathch
842369a82b DO NOT MERGE Add stop method to backup handler thread.
Currently we call .quit() on the underlying thread which will cause all
messages to stop being processed. This has the side effect that, because
the backup system is a state machine where the state transitions are
messages, the message to transition into a state where the WakeLock is
released may not occur when a user is torn down.

This change adds a stop method we can call instead of .quit() on the
thread which drops any remaining messages and then releases the
WakeLock.

We also wrap the wakelock acquire/release calls to prevent any acquire/release on
the underlying wakelock after a quit. For the acquire, this avoids a non-released
wakelock and for the release, this avoids a runtime exception which can happen
when we release a released wakelock

Test: atest CtsBackupTestCases CtsBackupHostTestCases
Test: m RunBackupFrameworksServicesRoboTests && atest RunBackupFrameworksServicesRoboTests
Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m acquire_quit  -log DEBUG
Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m quit_acquire  -log DEBUG
Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m acquire_quit_release  -log DEBUG
Bug: 136264323

Change-Id: I42dcf997fc44cde05695a563aa19c8e47f6f9f26
2019-07-24 17:46:09 +00:00
Chandan Nath
f38b869b24 Merge "Unsubscribe listeners when stopping UserBackupManagerService" into qt-r1-dev
am: 66e6767675

Change-Id: I037506fa1703d59161d07a4fed633917f572a3de
2019-07-24 09:33:00 -07:00
nathch
240daf679b Unsubscribe listeners when stopping UserBackupManagerService
Unsubscribe listeners as otherwise they schedule work on a stopped handler thread
after the user backup manager service is stopped

This also ensures that any dangling wakelocks are released when they are
garbage collected

This was already done in master in ag/8036218

Test: atest CtsBackupTestCases CtsBackupHostTestCases
Test: m RunBackupFrameworksServicesRoboTests && atest RunBackupFrameworksServicesRoboTests

Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m w_codechange
followed by "adb shell kill -10 pid" (where pid = "adb shell pgrep system_server") to force GC
see in logs: PowerManager: WakeLock finalized while still held: *backup*-0

Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m backup_w_codechange
followed by same as above

Bug: 136264323
Bug: 135261178
Change-Id: I769d750a46faa3d28634d302e0f8e18cce41a744
2019-07-24 09:31:01 +01:00
Al Sutton
d10e8f29a2 Reconcile the backup OWNERS files with the internal repo.
This CL addresses a specific branch where a merge conflict is happening.

Change-Id: I03d72ecec447304866d96e2f0908acbc2a1796b6
Merged-In: I42c27dfc0f3f792c46fe60e0f6807e51a2c3f21e
Test: build/make/tools/checkowners.py -c -v OWNERS
Bug: 134730213
2019-06-07 09:40:24 +01:00
Neil Fuller
65c26fc436 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: build only
Change-Id: Iff3a6b11adb8bcc51417a2e96e42c2db8a2de257
(cherry picked from commit 6f34427eb209a1c2b341c3aea034f46337308696)
2019-06-06 15:12:33 +00:00
Ruslan Tkhakokhov
1ee06b99eb Merge "Add dumpsys param to dump users running backup service" into qt-dev
am: 1d6b6aea68

Change-Id: Icb7ff269427311f38219fc8088aea7c394ef5f96
2019-05-10 05:48:15 -07:00
Ruslan Tkhakokhov
e0399328c9 Add dumpsys param to dump users running backup service
This is required in CTS tests to know when UserBackupManagerService init is finished.

Bug: 131307343
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases

Change-Id: Ia220f32b5be793b3b36efb2985604e29b0015e53
2019-05-10 08:10:47 +00:00
Ruslan Tkhakokhov
b5a044d872 Merge "Restore can begin while clearing app data is in progress" into qt-dev
am: c1da324980

Change-Id: I3cb6ae4fda47ee82e608f3c7ab64ffedc5c65f1e
2019-04-30 10:06:23 -07:00
Ruslan Tkhakokhov
29621710fb Restore can begin while clearing app data is in progress
Increasing timeout should help as in the only recent instance where we
saw this bug, it just exceeded the timeout by a second. Mostly the clear
operation happens very fast. Plus no obvious other solution to this
without major changes to BMS.

Fixes: 130347754
Test: 1) atest CtsBackupTestCases
      2) atest CtsBackupHostTestCases
      3) atest GtsBackupTestCases
      4) atest GtsBackupHostTestCases

Change-Id: I462724f2ea9a9bddd3a876e7f69302c35d69a0cb
2019-04-26 11:40:40 +01:00
Ruslan Tkhakokhov
a92bb9fa57 Merge "BroadcastReceiver in UserBackupManagerService can crash system_server" into qt-dev
am: 451e2d843d

Change-Id: Ia9bd1739203684ece631c53f6cdd1ab6d26e0f1c
2019-04-17 08:18:09 -07:00
Ruslan Tkhakokhov
451e2d843d Merge "BroadcastReceiver in UserBackupManagerService can crash system_server" into qt-dev 2019-04-17 14:54:46 +00:00
Annie Meng
13d6dcaf0a Merge "Fix KeyValueBackupTaskTest shadow errors" into qt-dev
am: e6763f287b

Change-Id: I188d0a2905fd532333e55b0fc5191d0b63c5af86
2019-04-17 05:31:59 -07:00
Annie Meng
599e9b3cc2 Fix KeyValueBackupTaskTest shadow errors
Replace IPackageManager with PackageManagerInternal to avoid shadowing
ActivityThread. This shadow is prone to unrelated framework changes breaking
our tests.

Bug: 130540953
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest AppBackupUtilsTest

Change-Id: Iea95a37da3df9d3f0887ed5ab30c7007306415a1
2019-04-16 16:00:19 +01:00
Ruslan Tkhakokhov
dd5e5e35b2 BroadcastReceiver in UserBackupManagerService can crash system_server
Make sure mBroadcastReceiver is initialized after its dependencies,
i.e. mTransportManager.

Bug: 130408863
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases

Manual test:
1) Before fix: Add Thread.sleep() before mTransportManager is
initialized in constructor and tirgger PACKAGE_CHANGED event. Verify
broadcast receiver callback is triggered and systen_process crashes.
2) After fix: Add Thread.sleep() before mTransportManager is
initialized in constructor and tirgger PACKAGE_CHANGED event. Verify
broadcast receiver callback is not triggered.

Change-Id: If1628628176a08a2d33d020ce270de92b606d6df
2019-04-16 12:14:51 +01:00
Neil Fuller
a76674f153 resolve merge conflicts of fe9b32e4bed2737bc5dfe518a201a0c84fb4aa20 to qt-dev-plus-aosp
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: Merge conflict resolution for approved change
Change-Id: I39bda8417f709f86b5b389a75ff34df8a28a3d8d
2019-04-11 18:09:18 +00:00
Neil Fuller
b5d1c15ec2 Switch from Byte.toHexString() to HexEncoding
Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Cherry-picking OWNERS approved internal version
Merged-In: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
2019-04-11 09:27:45 +00:00
Chandan Nath
7053e28b59 [Multi-user] Clean up user state stored in the system user directory
when user is removed.

For non system users, backup state is stored in both the user's own dir and the system dir.
When the user is removed, the user's own dir gets removed by the OS. This code change ensures
that the part of the user backup state which is in the system dir also gets removed.

Bug: 127650374

Test: atest -v CtsBackupHostTestCases:android.cts.backup.MultiUserBackupStateTest

Change-Id: I4ea252e8e6da608e36ec3ac335666923d88a8748
2019-04-03 13:36:55 +01:00
Chandan Nath
4fe554ae58 isBackupServiceActive should not depend on whether the user is started
Bug: 129763613

Test: atest com.android.server.backup.TrampolineTest
Change-Id: Ia05451a4d45a14bc30353e268cb6616ceb49947e
2019-04-02 21:20:31 +01:00
Annie Meng
4eb4efc466 API Review: Make dataManagementLabel a CharSequence
Make the data management label a CharSequence for the system APIs:
- BackupManager#updateTransportAttributes
- BackupManager#getDataManagementLabel
- BackupTransport#dataManagementLabel

Renames dataManagementLabel -> dataManagementIntentLabel to change
return type

Removes getDataManagementLabel AIDL method as usages converted to use
"forUser" version in topic CL.

Bug: 113856654
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest BackupManagerTransportAttributesHostSideTest
3) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
4) Manual: boot and verify transports registered properly using old API;
Modify LocalTransport to use new API, verify success

Change-Id: Ia48017156debe0a29684909f58927fa1fbf972f9
2019-03-20 12:13:10 +00:00
Ruslan Tkhakokhov
507e6f834d API Review: Internal RestoreSession#restorePackages
Bug: 120843781
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases

Change-Id: Ice42aedd702e1c16b074d7a00d7b15d8f4aaf733
2019-03-18 12:26:02 +00:00
Ruslan Tkhakokhov
57263a6c34 Fix runtime restart: at com.android.server.backup.restore.FullRestoreEngine
When a full backup operation times out, resources are cleaned up
including closing and nullifying pipes. However FullRestoreEngine.restoreOneFile()
doesn't stop execution and can access the pipes causing RuntimeException.

This CL adds a flag to show whether the operation has timed out and
checks it before accessing the pipes.

Bug: 126244736
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases
      6) Manual: Test full backup/restore flow using Flipboard app

Change-Id: If400142a6fceaa4065409774bbff1cad8b4c6163
2019-03-15 11:37:43 +00:00
Ruslan Tkhakokhov
70afec382d Fix BackupManager#getUserForSerialNumber
Test: atest ProfileSerialNumberHostSideTest

Currently BackupManager#getUserForSerialNumber goes through users
associated with the calling user (inluding the calling user itself) and
looks for the given serial number. However, to get the list of users it calls
UserManager#getUserProfiles that operates for the users associated with
the calling process (in our case - system user since the call is made
from BMS). While this works for our current use case (only support
backup for system user and their work profile, meaning
BackupManager#getUserForSerialNumber will only be called for system
user), it won't work for a full multi-user case.

Change-Id: Ia42a69a1216ed9a5dae596e44336290d2718de7a
2019-02-21 15:23:53 +00:00
Ruslan Tkhakokhov
d894401fee BackupManager shouldn't clear app's data during restore if agent wasn't invoked yet
Bug: 123738850
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases
      6) Manual: Force exceptions before/after agent was called, verify
                 the new behavior.

Change-Id: Ia9ddea2939fc6d72dd9bc060b0c47bc8da2b868d
2019-02-18 17:02:21 +00:00
Ruslan Tkhakokhov
aee28fd42f Use new manifest flag to gate clearing data during restore
Use the new manifest flag introduced in ag/5762489 to gate clearing data
during restore.

Bug: 120267643
Test: 1) atest RunBackupFrameworksServicesRoboTests
      2) atest CtsBackupTestCases
      3) atest CtsBackupHostTestCases
      4) atest GtsBackupTestCases
      5) atest GtsBackupHostTestCases

Change-Id: Ida4a9e96f44d1c740d217faed2b9f928e02865ec
2019-02-15 20:23:11 +00:00
Chandan Nath
953682187e [Multi-user]: R backwards compatibility in activating/deactivating the service
Bug: 123347794

In Q, backup is OFF by default for non-system users. In R, we will change that to ON
unless backup was explicitly deactivated with a (permissioned) call to
setBackupServiceActive.
Therefore, remember this for use in R. Basically the default in R will be
rememberFile.exists() ? rememberFile.value() : ON
Note that this has to be done right after the permission checks and before any other
action since we need to remember that a permissioned call was made irrespective of
whether the call changes the state or not.

Test: 1. atest $(find frameworks/base/services/tests/servicestests/src/com/android/server/backup -name '\''*Test.java'\'')'
2. atest RunBackupFrameworksServicesRoboTests
3. atest CtsBackupTestCases CtsBackupHostTestCases GtsBackupTestCases GtsBackupHostTestCases

Change-Id: I0897d6f9f8d8d8a9fc3c0faabfc9045b416dd25f
2019-02-14 13:19:05 +00:00
Bram Bonné
985b1800d4 Renames ChunkListing.java to ChunkListingMap.java.
Bug: 111386661
Test: atest RunBackupFrameworksServicesRoboTests
Change-Id: I94327204ed39b4b4a6138eb6ddd1b28732a16363
2019-02-12 09:29:19 +00:00
Bram Bonné
af4ba04daf Merge "Ports DiffScriptBackupWriter from gmscore to AOSP." 2019-02-07 09:36:51 +00:00
Stefano Tommasini
bd8491866c Merge "Create API in BackupManagerService for work profile serial id mapping." 2019-02-06 17:41:02 +00:00
Bram Bonné
02cf411d27 Ports DiffScriptBackupWriter from gmscore to AOSP.
A few additional changes (apart from style and usual dependencies) were
needed:
- Additional dependencies (not part of Backup & Restore code) were
ported over:
	- ByteRange
	- DiffScriptWriter
	- OutputStreamWrapper
	- SingleStreamDiffScriptWriter

- DiffScripBackupWriter.ENCRYPTION_DIFF_SCRIPT_MAX_CHUNK_SIZE_BYTES is
now a constant rather than a flag.
- Additional tests were added for SingleStreamDiffScriptWriter.

Bug: 111386661
Test: atest RunBackupFrameworksServicesRoboTests
Change-Id: Ia3234bb8d665211e6fa91d6a92d190171b0d2dc1
2019-02-06 18:00:30 +01:00
Stefano Tommasini
471a35da6c Create API in BackupManagerService for work profile serial id mapping.
The launcher needs to know the serial id of the ancenstral device's work
profile  and the serial id of the current device's work profile in order
to properly perform a restore.

Test: atest BackupManagerService
Bug: 111301511

Change-Id: Ia929dcc2cb599f935183be1820b1c45f2d6e1de7
2019-02-05 18:16:49 +00:00
Annie Meng
924c8a92ac [Multi-user] Whitelist "android" for non-system user backup
Move to a whitelist of system apps that are eligible for backup in
non-system users.

Bug: 123349308
Test: "adb shell bmgr backupnow android" succeeds for system
and non-system users.

Change-Id: I7bc4982a6e105c2343636532dd2010aa43132d23
2019-01-31 17:23:12 +00:00
Annie Meng
db19aa43d0 Merge "[Multi-user] Clear calling identity for backup activation" 2019-01-31 11:13:14 +00:00
Annie Meng
312e780346 [Multi-user] Clear calling identity for backup activation
As part of bmgr activate, if the user is unlocked then we attempt to
start the backup service for them. However, as part of initialization,
AMS enforces the system uid so clear calling identity before starting
the service (as we have the shell uid).

Bug: 123572171
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest TrampolineTest
3) Manual: Unlock secondary user -> bmgr activate -> no exception thrown
and service started

Change-Id: I441491e19d9f3c9b49b5778d51ae5331230b129b
2019-01-30 21:09:04 +00:00
Annie Meng
9778ed5c0d Merge "[Multi-user] Properly check for system apps in multi-user context" 2019-01-30 14:45:16 +00:00
Annie Meng
5a8e6febec [Multi-user] Properly check for system apps in multi-user context
The previous check compared app uid directly to FIRST_APPLICATION_UID
which doesn't work for non-system users as uid incorporates the user id
(so system apps in non-system users would always be categorized as
non-system apps).

Bug: 122309666
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) Manual: verify system packages backed up for system user, not backed
up for non-system user.

Change-Id: I5e11b4b7c41d74d43d545e4831d09a9a3a59e5cf
2019-01-29 19:31:24 +00:00
Annie Meng
21a91fbbd0 [Multi-user] Schedule full backup jobs immediately
All other schedule call sites for full backup and key value schedule
inline. The operation should be quick and scheduling on a separate
handler makes testing flaky.

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest ScheduledBackupHostSideTest
3) atest ProfileScheduledJobHostSideTest
Change-Id: Id6ae557080da5a98c2ac572ca6b4b7973b7a9c29
2019-01-28 19:29:57 +00:00
Annie Meng
75350778e2 Merge "[Multi-user] Disable backup by default in non-system users" 2019-01-24 20:35:51 +00:00
Annie Meng
bdb8848abe [Multi-user] Disable backup by default in non-system users
Key changes in this CL:
- Backup is now disabled by default in non-system users unless DPM
activates backup for this user AND the system user is activated. This
provides gating for the multi-user B&R feature.
- Activation is done via an 'activate' file that is per-user (but lives
in the system user directory to account for locked users).
- isBackupServiceActive() handles both locked and unlocked users.
- Added a bmgr command to expose isBackupServiceActive() for testing
purposes and enforce appropriate permissions.

Future CLs:
- Handle future migration to backup on by default for non-system users
- Change CTS tests to use the new bmgr command

Bug: 121306407
Test: 1) atest TrampolineTest
2) Start system user -> service started; run backup and restore
successfully
3) Start non-system user -> ignored;
4) adb shell bmgr --user 0 activate true -> security exception;
adb shell bmgr --user 10 activate true -> security exception (work
profile);
adb shell bmgr --user 11 activate true/false -> creates/deletes activate
file and starts/stops the service
Change-Id: Ic77db9b8b2e5170dcf89bef863dac4713730797a
2019-01-24 15:14:09 +00:00
Ruslan Tkhakokhov
6712b72a48 [Multi-user] Verfiy full backup/restore flow
Bug: 121198030
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases

Manual testing:
1. Start secondary user -> verify fb-schedule file is created, full backup queue initialised
2. Verify fullbackup of 1 package for system/secondary users, [package] only exists for current user:
  * bmgr --user [user-id] fullbackup [package]
  * Verify in logs that backup is successful
  * Uninstall/install [package]
  * Verify data is restored
3. Verify fullbackup of 1 package for secondary user, [package] eixtst for user 0:
  * bmgr fullbackup [package]
  * bmgr --user [user-id] fullbackup [package]
  * Verify in logs that backup is successful
  * Uninstall/install [package] for secondary user
  * bmgr --user [user-id] restore [token] [package]
  * Verify the data restored is different from system user data and belongs to [user-id]
3. Verify backup of all packages for system/secondary users:
  * bmgr --user [user-id] backupnow --all
  * Verify system packages (android, settings, wallpaper) are skipped for secondary user
  * Verify in logs that backup is successful
  * Uninstall/install [package]
  * Verify data is restored

Base -> Patchset 2: Update method calls to use asUser versions
Patchset 2 -> Patchset 3: Update opComplete callback to accept userId
Patchset 3 -> Patchset 4: Gate system packages from backup/restore for non-system users

Change-Id: Ic3986709ba4d46c0af9da45bb4dd682ee2aef3ce
2019-01-23 15:57:11 +00:00
Stefano Tommasini
25b54058c0 Merge "Make Trampoline support multi-user backup." 2019-01-22 10:44:49 +00:00
Stefano Tommasini
72d03de8fa Make Trampoline support multi-user backup.
We create a differnte suppressBackup file for each user, and gate
operations on that.
Backup still can't be toggled for other users that is not SYSTEM.

Test: atest TrampolineTest
Test: Verify backup works and restore works, just for user 0 for now.
BUG: 121198006

Change-Id: Ib4ecf48d248319e9d890515937fc087ef8f46039
2019-01-21 15:29:47 +00:00
Annie Meng
fcdfa01fab [Multi-user] Remove dir management for non-system users
Per-user CE directories are managed by vold so we don't need to
initialize or apply restorecon on them in our service.

Once the system user is migrated to the its CE directory, we can remove
the remaining restorecon and mkdirs logic.

Accompanies aosp/875352 and aosp/873133

Bug: 121197420
Test: 1) Boot device; check directories exist and labelled properly
for system user; perform backup successfully
2) Add secondary user; check directories exist and labelled properly;
perform backup succesfully

Change-Id: If848da4c9254db87b393fce6cfc4169785bfac51
2019-01-16 21:42:55 +00:00
Annie Meng
53cf520817 [Multi-user] Convert various calls to use user id
Changes various transport, restore and general bookkeeping flows. Also
performs restorecon recursively to relabel child directories properly.

Bug: 121198605
Bug: 121197942
Bug: 121198606
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) user unlocked -> transports registered successfully
3) adb shell bmgr backupnow [package]
4) Cloud restore backup set from 3) -> apps + widgets successful
5) atest BackupManagerTransportAttributesHostSideTest
6) Add secondary user -> check all directories/files relabelled
Change-Id: I26b23fd7bf10b792658fa7c44941be50aee65521
2019-01-16 12:51:12 +00:00
Chandan Nath
2c9ae09194 [Multi-user] Change ActivityManagerService to use userId.
1. The book-keeping needs to be per user.
2. The calls into IBackupManager need to pass in the userId.
3. convert clearPendingBackup to an internal service call.

Bug: 121197004

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) 'adb shell bmgr' enabled/backupnow flow

Change-Id: If49e00fc1d6aa770815c454f01b53865f6a68db4
2019-01-15 12:54:28 +00:00
Varun Shah
f87b8c8854 Merge "Updating certain services to be final fields." 2019-01-15 09:00:25 +00:00
Annie Meng
ca1b5b9f9a Merge "[Multi-user] Convert key-value flow to use user id" 2019-01-14 23:43:16 +00:00
Ruslan Tkhakokhov
1cf011cd76 Merge "[Multi-User] Make JobScheduler logic multi-user aware" 2019-01-14 20:07:14 +00:00
Annie Meng
99c350da2c [Multi-user] Convert key-value flow to use user id
Change paths that key-value backup/restore flow goes through to use
user id.

Bug: 121198605
Bug: 121198606
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) adb shell bmgr backupnow [kv package]
Change-Id: Ie192391561f8e03f623c4d86914b3787ff2c0f88
2019-01-14 18:05:10 +00:00