@Test public void testBackupNotificationReceivers_afterSetting_updatesAndParsesCorrectly() { final String receiversSetting = BackupManagerConstants.BACKUP_FINISHED_NOTIFICATION_RECEIVERS + "=" + PACKAGE_NAME + ':' + ANOTHER_PACKAGE_NAME; putStringAndNotify(receiversSetting); String[] backupFinishedNotificationReceivers = mConstants.getBackupFinishedNotificationReceivers(); assertThat(backupFinishedNotificationReceivers) .isEqualTo(new String[] {PACKAGE_NAME, ANOTHER_PACKAGE_NAME}); }
public synchronized String[] getBackupFinishedNotificationReceivers() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getBackupFinishedNotificationReceivers(...) returns " + TextUtils.join(", ", mBackupFinishedNotificationReceivers)); } return mBackupFinishedNotificationReceivers; }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized String[] getBackupFinishedNotificationReceivers() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getBackupFinishedNotificationReceivers(...) returns " + TextUtils.join(", ", mBackupFinishedNotificationReceivers)); } return mBackupFinishedNotificationReceivers; } }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized String[] getBackupFinishedNotificationReceivers() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getBackupFinishedNotificationReceivers(...) returns " + TextUtils.join(", ", mBackupFinishedNotificationReceivers)); } return mBackupFinishedNotificationReceivers; } BackupManagerConstants(Handler handler, ContentResolver resolver); }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized String[] getBackupFinishedNotificationReceivers() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getBackupFinishedNotificationReceivers(...) returns " + TextUtils.join(", ", mBackupFinishedNotificationReceivers)); } return mBackupFinishedNotificationReceivers; } BackupManagerConstants(Handler handler, ContentResolver resolver); String getSettingValue(ContentResolver resolver); synchronized void update(KeyValueListParser parser); synchronized long getKeyValueBackupIntervalMilliseconds(); synchronized long getKeyValueBackupFuzzMilliseconds(); synchronized boolean getKeyValueBackupRequireCharging(); synchronized int getKeyValueBackupRequiredNetworkType(); synchronized long getFullBackupIntervalMilliseconds(); synchronized boolean getFullBackupRequireCharging(); synchronized int getFullBackupRequiredNetworkType(); synchronized String[] getBackupFinishedNotificationReceivers(); }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized String[] getBackupFinishedNotificationReceivers() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getBackupFinishedNotificationReceivers(...) returns " + TextUtils.join(", ", mBackupFinishedNotificationReceivers)); } return mBackupFinishedNotificationReceivers; } BackupManagerConstants(Handler handler, ContentResolver resolver); String getSettingValue(ContentResolver resolver); synchronized void update(KeyValueListParser parser); synchronized long getKeyValueBackupIntervalMilliseconds(); synchronized long getKeyValueBackupFuzzMilliseconds(); synchronized boolean getKeyValueBackupRequireCharging(); synchronized int getKeyValueBackupRequiredNetworkType(); synchronized long getFullBackupIntervalMilliseconds(); synchronized boolean getFullBackupRequireCharging(); synchronized int getFullBackupRequiredNetworkType(); synchronized String[] getBackupFinishedNotificationReceivers(); @VisibleForTesting
    static final String KEY_VALUE_BACKUP_INTERVAL_MILLISECONDS; @VisibleForTesting
    static final String KEY_VALUE_BACKUP_FUZZ_MILLISECONDS; @VisibleForTesting
    static final String KEY_VALUE_BACKUP_REQUIRE_CHARGING; @VisibleForTesting
    static final String KEY_VALUE_BACKUP_REQUIRED_NETWORK_TYPE; @VisibleForTesting
    static final String FULL_BACKUP_INTERVAL_MILLISECONDS; @VisibleForTesting
    static final String FULL_BACKUP_REQUIRE_CHARGING; @VisibleForTesting
    static final String FULL_BACKUP_REQUIRED_NETWORK_TYPE; @VisibleForTesting
    static final String BACKUP_FINISHED_NOTIFICATION_RECEIVERS; @VisibleForTesting
    static final long DEFAULT_KEY_VALUE_BACKUP_INTERVAL_MILLISECONDS; @VisibleForTesting
    static final long DEFAULT_KEY_VALUE_BACKUP_FUZZ_MILLISECONDS; @VisibleForTesting static final boolean DEFAULT_KEY_VALUE_BACKUP_REQUIRE_CHARGING; @VisibleForTesting static final int DEFAULT_KEY_VALUE_BACKUP_REQUIRED_NETWORK_TYPE; @VisibleForTesting
    static final long DEFAULT_FULL_BACKUP_INTERVAL_MILLISECONDS; @VisibleForTesting static final boolean DEFAULT_FULL_BACKUP_REQUIRE_CHARGING; @VisibleForTesting static final int DEFAULT_FULL_BACKUP_REQUIRED_NETWORK_TYPE; @VisibleForTesting
    static final String DEFAULT_BACKUP_FINISHED_NOTIFICATION_RECEIVERS; }