OSDN Git Service

If backup service is not available, remove Settings->Backup and Backup->"Backup is...
authorChandan Nath <nathch@google.com>
Wed, 10 Apr 2019 16:02:02 +0000 (17:02 +0100)
committerChandan Nath <nathch@google.com>
Mon, 15 Apr 2019 19:47:34 +0000 (20:47 +0100)
commit826a91c56ef5c8ce3debcc09936f56c4ab0c6659
treed492a55570fc4fbe5504fc41e6f2cfb4d22339f3
parent96b534951c7f180b0917b364d43602e7c94c854b
If backup service is not available, remove Settings->Backup and Backup->"Backup is disabled by
admin" from search results.

"Backup -> Backup" still appears due to the PrivacySettingsActivity. On clicking that,
we get "Backup is disabled by admin" which is OK

Bug: 129743816

Test: 1. atest -v UserBackupSettingsActivityTest
2. atest -v BackupInactivePreferenceControllerTest
3. Create and switch to secondary user. Type "backup" in settings search. Note that only
"Backup->Backup" is shown and on clicking it, we get "Backup is disabled by admin"

Change-Id: Ic13e2d745c9511cbebe27aa4c6f5cd89b277fc37
src/com/android/settings/SettingsActivity.java
src/com/android/settings/backup/BackupInactivePreferenceController.java
src/com/android/settings/backup/BackupSettingsHelper.java
src/com/android/settings/backup/UserBackupSettingsActivity.java
tests/robotests/src/com/android/settings/backup/BackupInactivePreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/UserBackupSettingsActivityTest.java