@Test public void testGetConstant_whenSettingHasInvalidType_doesNotUpdateParamsOrThrow() { boolean testValue = true; final String invalidSettingType = BackupManagerConstants.KEY_VALUE_BACKUP_REQUIRED_NETWORK_TYPE + "=" + testValue; putStringAndNotify(invalidSettingType); int keyValueBackupRequiredNetworkType = mConstants.getKeyValueBackupRequiredNetworkType(); assertThat(keyValueBackupRequiredNetworkType) .isEqualTo(BackupManagerConstants.DEFAULT_KEY_VALUE_BACKUP_REQUIRED_NETWORK_TYPE); }
public synchronized int getKeyValueBackupRequiredNetworkType() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getKeyValueBackupRequiredNetworkType(...) returns " + mKeyValueBackupRequiredNetworkType); } return mKeyValueBackupRequiredNetworkType; }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized int getKeyValueBackupRequiredNetworkType() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getKeyValueBackupRequiredNetworkType(...) returns " + mKeyValueBackupRequiredNetworkType); } return mKeyValueBackupRequiredNetworkType; } }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized int getKeyValueBackupRequiredNetworkType() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getKeyValueBackupRequiredNetworkType(...) returns " + mKeyValueBackupRequiredNetworkType); } return mKeyValueBackupRequiredNetworkType; } BackupManagerConstants(Handler handler, ContentResolver resolver); }
BackupManagerConstants extends KeyValueSettingObserver { public synchronized int getKeyValueBackupRequiredNetworkType() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getKeyValueBackupRequiredNetworkType(...) returns " + mKeyValueBackupRequiredNetworkType); } return mKeyValueBackupRequiredNetworkType; } 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 int getKeyValueBackupRequiredNetworkType() { if (BackupManagerService.DEBUG_SCHEDULING) { Slog.v( TAG, "getKeyValueBackupRequiredNetworkType(...) returns " + mKeyValueBackupRequiredNetworkType); } return mKeyValueBackupRequiredNetworkType; } 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; }