diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-12 15:03:40 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-12 15:03:40 +0100 |
commit | ae08d65dc25290d8d411ff44d7eb07f4cb74e8c6 (patch) | |
tree | 1afe8d827942011eafc2afebd0ae158b24f8b38e /core/java/android/content/SyncInfo.java | |
parent | 90e1e6b2e9b79d444545d729561cf7fc099a8f10 (diff) | |
parent | 2df190c3a2ed1e339bb34c175fa227f90e7cbb02 (diff) | |
download | frameworks_base-ae08d65dc25290d8d411ff44d7eb07f4cb74e8c6.zip frameworks_base-ae08d65dc25290d8d411ff44d7eb07f4cb74e8c6.tar.gz frameworks_base-ae08d65dc25290d8d411ff44d7eb07f4cb74e8c6.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_base into replicant-6.0
Diffstat (limited to 'core/java/android/content/SyncInfo.java')
-rw-r--r-- | core/java/android/content/SyncInfo.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/content/SyncInfo.java b/core/java/android/content/SyncInfo.java index a586d6f..ab3c30b 100644 --- a/core/java/android/content/SyncInfo.java +++ b/core/java/android/content/SyncInfo.java @@ -24,6 +24,13 @@ import android.os.Parcelable; * Information about the sync operation that is currently underway. */ public class SyncInfo implements Parcelable { + /** + * Used when the caller receiving this object doesn't have permission to access the accounts + * on device. + * @See Manifest.permission.GET_ACCOUNTS + */ + private static final Account REDACTED_ACCOUNT = new Account("*****", "*****"); + /** @hide */ public final int authorityId; @@ -44,6 +51,17 @@ public class SyncInfo implements Parcelable { */ public final long startTime; + /** + * Creates a SyncInfo object with an unusable Account. Used when the caller receiving this + * object doesn't have access to the accounts on the device. + * @See Manifest.permission.GET_ACCOUNTS + * @hide + */ + public static SyncInfo createAccountRedacted( + int authorityId, String authority, long startTime) { + return new SyncInfo(authorityId, REDACTED_ACCOUNT, authority, startTime); + } + /** @hide */ public SyncInfo(int authorityId, Account account, String authority, long startTime) { this.authorityId = authorityId; |