Dump information for all users running backup in backup dumpsys.
Currently backup dumpsys in bugreport only contains information for system user making it hard to debug backup bugs in non-system users. Therefore, add dumpsys information for all users running backup. For system user, keep the dumpsys format the same for compatibility with cts and gts tests. For non-system users, add a prefix "User <userid>:" to all dumpsys headers. The changes in Android.bp and AndroidManifest.xml are to support mocking of the static method DumpUtils.checkDumpAndUsageStatsPermission in the test testDump_systemUserFirst Bug: 143867387 Test: atest com.android.server.backup.BackupManagerServiceTest Test: atest com.android.server.backup.UserBackupManagerServiceTest Test: adb shell pm create-user test1 -> say this gives 11 adb shell am start-user 11 adb shell bmgr --user 11 activate true adb shell dumpsys backup users -> "Backup Manager is running for users: 0 11" adb shell dumpsys backup -> contains both "Backup Manager is enabled / setup complete / not pending init" and "User 11:Backup Manager is disabled / not setup complete / not pending init" adb shell pm remove-user 11 Test: "adb bugreport" on device with secondary user as created above and check that result contains dumpsys for both system and secondary users. Test: atest -v CtsBackupTestCases Test: atest -v CtsBackupHostTestCases Change-Id: Ib94c168f8e89b0ba8f398152ea744fe3d626efc4
Loading
Please register or sign in to comment