diff options
author | Natalie Masse <nmasse@google.com> | 2014-11-24 18:38:00 +0000 |
---|---|---|
committer | Natalie Masse <nmasse@google.com> | 2014-11-24 18:38:00 +0000 |
commit | e24908e34298cc383df954e02b0de68a0cc782f6 (patch) | |
tree | 5b109e4456b0df1a63bf9219da51a2ebb4157af8 /docs/html/training/sync-adapters | |
parent | 05282133c7491fd2b5e8f3da05408ff0165df526 (diff) | |
download | frameworks_base-e24908e34298cc383df954e02b0de68a0cc782f6.zip frameworks_base-e24908e34298cc383df954e02b0de68a0cc782f6.tar.gz frameworks_base-e24908e34298cc383df954e02b0de68a0cc782f6.tar.bz2 |
Fixed NullPointerException due to null Bundle, changed time interval from ms to seconds as per method documentation
Change-Id: Ie433d4bfd7ac7fd2e524a201497c250a7aede47d
Diffstat (limited to 'docs/html/training/sync-adapters')
-rw-r--r-- | docs/html/training/sync-adapters/running-sync-adapter.jd | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/html/training/sync-adapters/running-sync-adapter.jd b/docs/html/training/sync-adapters/running-sync-adapter.jd index 8fb7e80..194e94b 100644 --- a/docs/html/training/sync-adapters/running-sync-adapter.jd +++ b/docs/html/training/sync-adapters/running-sync-adapter.jd @@ -396,13 +396,11 @@ public class MainActivity extends FragmentActivity { // Account public static final String ACCOUNT = "default_account"; // Sync interval constants - public static final long MILLISECONDS_PER_SECOND = 1000L; public static final long SECONDS_PER_MINUTE = 60L; public static final long SYNC_INTERVAL_IN_MINUTES = 60L; public static final long SYNC_INTERVAL = SYNC_INTERVAL_IN_MINUTES * - SECONDS_PER_MINUTE * - MILLISECONDS_PER_SECOND; + SECONDS_PER_MINUTE; // Global variables // A content resolver for accessing the provider ContentResolver mResolver; @@ -419,7 +417,7 @@ public class MainActivity extends FragmentActivity { ContentResolver.addPeriodicSync( ACCOUNT, AUTHORITY, - null, + Bundle.EMPTY, SYNC_INTERVAL); ... } |