am 77283ec9: Merge "Fixed NullPointerException due to null Bundle, changed time interval from ms to seconds as per method documentation" into lmp-docs

* commit '77283ec981fc022cd26ced1e44ad21cdc0b2e4ae':
  Fixed NullPointerException due to null Bundle, changed time interval from ms to seconds as per method documentation
This commit is contained in:
Natalie Masse
2014-11-25 11:10:09 +00:00
committed by Android Git Automerger

View File

@@ -396,13 +396,11 @@ public class MainActivity extends FragmentActivity {
// Account // Account
public static final String ACCOUNT = "default_account"; public static final String ACCOUNT = "default_account";
// Sync interval constants // Sync interval constants
public static final long MILLISECONDS_PER_SECOND = 1000L;
public static final long SECONDS_PER_MINUTE = 60L; public static final long SECONDS_PER_MINUTE = 60L;
public static final long SYNC_INTERVAL_IN_MINUTES = 60L; public static final long SYNC_INTERVAL_IN_MINUTES = 60L;
public static final long SYNC_INTERVAL = public static final long SYNC_INTERVAL =
SYNC_INTERVAL_IN_MINUTES * SYNC_INTERVAL_IN_MINUTES *
SECONDS_PER_MINUTE * SECONDS_PER_MINUTE;
MILLISECONDS_PER_SECOND;
// Global variables // Global variables
// A content resolver for accessing the provider // A content resolver for accessing the provider
ContentResolver mResolver; ContentResolver mResolver;
@@ -419,7 +417,7 @@ public class MainActivity extends FragmentActivity {
ContentResolver.addPeriodicSync( ContentResolver.addPeriodicSync(
ACCOUNT, ACCOUNT,
AUTHORITY, AUTHORITY,
null, Bundle.EMPTY,
SYNC_INTERVAL); SYNC_INTERVAL);
... ...
} }