1718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana/* 2718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * Copyright (C) 2009 The Android Open Source Project 3718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * 4718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * Licensed under the Apache License, Version 2.0 (the "License"); 5718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * you may not use this file except in compliance with the License. 6718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * You may obtain a copy of the License at 7718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * 8718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * http://www.apache.org/licenses/LICENSE-2.0 9718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * 10718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * Unless required by applicable law or agreed to in writing, software 11718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * distributed under the License is distributed on an "AS IS" BASIS, 12718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * See the License for the specific language governing permissions and 14718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * limitations under the License. 15718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana */ 16718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 17718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintanapackage android.content; 18718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 19718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintanaimport android.text.TextUtils; 20ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintanaimport android.os.Parcelable; 21ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintanaimport android.os.Parcel; 22718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 23718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana/** 24718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * Value type that represents a SyncAdapterType. This object overrides {@link #equals} and 25718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana * {@link #hashCode}, making it suitable for use as the key of a {@link java.util.Map} 26718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana */ 27ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintanapublic class SyncAdapterType implements Parcelable { 28718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana public final String authority; 29718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana public final String accountType; 30e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana public final boolean isKey; 31e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana private final boolean userVisible; 32e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana private final boolean supportsUploading; 330c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana private final boolean isAlwaysSyncable; 340c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana private final boolean allowParallelSyncs; 35e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana private final String settingsActivity; 36718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 370c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana public SyncAdapterType(String authority, String accountType, boolean userVisible, 38e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana boolean supportsUploading) { 39718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana if (TextUtils.isEmpty(authority)) { 40718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana throw new IllegalArgumentException("the authority must not be empty: " + authority); 41718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 42718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana if (TextUtils.isEmpty(accountType)) { 43718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana throw new IllegalArgumentException("the accountType must not be empty: " + accountType); 44718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 45718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana this.authority = authority; 46718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana this.accountType = accountType; 474a6679b97e0285c5b65ec5c0d9080ff90d3e9e81Fred Quintana this.userVisible = userVisible; 48e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.supportsUploading = supportsUploading; 490c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.isAlwaysSyncable = false; 500c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.allowParallelSyncs = false; 51e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana this.settingsActivity = null; 520c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.isKey = false; 530c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 540c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana 550c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana /** @hide */ 560c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana public SyncAdapterType(String authority, String accountType, boolean userVisible, 570c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana boolean supportsUploading, 580c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana boolean isAlwaysSyncable, 59e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana boolean allowParallelSyncs, 60e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana String settingsActivity) { 610c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana if (TextUtils.isEmpty(authority)) { 620c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana throw new IllegalArgumentException("the authority must not be empty: " + authority); 630c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 640c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana if (TextUtils.isEmpty(accountType)) { 650c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana throw new IllegalArgumentException("the accountType must not be empty: " + accountType); 660c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 670c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.authority = authority; 680c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.accountType = accountType; 690c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.userVisible = userVisible; 700c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.supportsUploading = supportsUploading; 710c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.isAlwaysSyncable = isAlwaysSyncable; 720c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.allowParallelSyncs = allowParallelSyncs; 73e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana this.settingsActivity = settingsActivity; 74e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.isKey = false; 75e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 76e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana 77e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana private SyncAdapterType(String authority, String accountType) { 78e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (TextUtils.isEmpty(authority)) { 79e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana throw new IllegalArgumentException("the authority must not be empty: " + authority); 80e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 81e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (TextUtils.isEmpty(accountType)) { 82e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana throw new IllegalArgumentException("the accountType must not be empty: " + accountType); 83e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 84e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.authority = authority; 85e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.accountType = accountType; 86e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.userVisible = true; 87e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.supportsUploading = true; 880c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.isAlwaysSyncable = false; 890c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana this.allowParallelSyncs = false; 90e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana this.settingsActivity = null; 91e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this.isKey = true; 92e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 93e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana 94e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana public boolean supportsUploading() { 95e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (isKey) { 96e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana throw new IllegalStateException( 97e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana "this method is not allowed to be called when this is a key"); 98e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 99e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana return supportsUploading; 100e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 101e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana 102e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana public boolean isUserVisible() { 103e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (isKey) { 104e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana throw new IllegalStateException( 105e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana "this method is not allowed to be called when this is a key"); 106e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 107e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana return userVisible; 1084a6679b97e0285c5b65ec5c0d9080ff90d3e9e81Fred Quintana } 1094a6679b97e0285c5b65ec5c0d9080ff90d3e9e81Fred Quintana 1100c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana /** 1110c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * @return True if this SyncAdapter supports syncing multiple accounts simultaneously. 1120c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * If false then the SyncManager will take care to only start one sync at a time 1130c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * using this SyncAdapter. 1140c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana */ 1150c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana public boolean allowParallelSyncs() { 1160c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana if (isKey) { 1170c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana throw new IllegalStateException( 1180c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana "this method is not allowed to be called when this is a key"); 1190c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 1200c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana return allowParallelSyncs; 1210c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 1220c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana 1230c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana /** 1240c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * If true then the SyncManager will never issue an initialization sync to the SyncAdapter 1250c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * and will instead automatically call 1260c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * {@link ContentResolver#setIsSyncable(android.accounts.Account, String, int)} with a 1270c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * value of 1 for each account and provider that this sync adapter supports. 1280c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * @return true if the SyncAdapter does not require initialization and if it is ok for the 1290c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana * SyncAdapter to treat it as syncable automatically. 1300c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana */ 1310c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana public boolean isAlwaysSyncable() { 1320c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana if (isKey) { 1330c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana throw new IllegalStateException( 1340c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana "this method is not allowed to be called when this is a key"); 1350c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 1360c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana return isAlwaysSyncable; 1370c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana } 1380c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana 139e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana /** 140e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana * @return The activity to use to invoke this SyncAdapter's settings activity. 141e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana * May be null. 142e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana */ 143e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana public String getSettingsActivity() { 144e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana if (isKey) { 145e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana throw new IllegalStateException( 146e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana "this method is not allowed to be called when this is a key"); 147e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana } 148e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana return settingsActivity; 149e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana } 150e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana 1514a6679b97e0285c5b65ec5c0d9080ff90d3e9e81Fred Quintana public static SyncAdapterType newKey(String authority, String accountType) { 152e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana return new SyncAdapterType(authority, accountType); 153718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 154718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 155718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana public boolean equals(Object o) { 156718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana if (o == this) return true; 157718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana if (!(o instanceof SyncAdapterType)) return false; 158718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana final SyncAdapterType other = (SyncAdapterType)o; 159e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana // don't include userVisible or supportsUploading in the equality check 160718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana return authority.equals(other.authority) && accountType.equals(other.accountType); 161718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 162718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 163718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana public int hashCode() { 164718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana int result = 17; 165718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana result = 31 * result + authority.hashCode(); 166718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana result = 31 * result + accountType.hashCode(); 167e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana // don't include userVisible or supportsUploading the hash 168718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana return result; 169718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 170718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana 171718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana public String toString() { 172e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (isKey) { 173e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana return "SyncAdapterType Key {name=" + authority 174e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + ", type=" + accountType 175e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + "}"; 176e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } else { 177e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana return "SyncAdapterType {name=" + authority 178e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + ", type=" + accountType 179e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + ", userVisible=" + userVisible 180e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + ", supportsUploading=" + supportsUploading 1810c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana + ", isAlwaysSyncable=" + isAlwaysSyncable 1820c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana + ", allowParallelSyncs=" + allowParallelSyncs 183e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana + ", settingsActivity=" + settingsActivity 184e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana + "}"; 185e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 186718d8a2d7ff3e864a73879eb646f46c14ab74d07Fred Quintana } 187ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana 188ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public int describeContents() { 189ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana return 0; 190ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana } 191ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana 192ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public void writeToParcel(Parcel dest, int flags) { 193e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana if (isKey) { 194e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana throw new IllegalStateException("keys aren't parcelable"); 195e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana } 196e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana 197ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana dest.writeString(authority); 198ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana dest.writeString(accountType); 1994a6679b97e0285c5b65ec5c0d9080ff90d3e9e81Fred Quintana dest.writeInt(userVisible ? 1 : 0); 200e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana dest.writeInt(supportsUploading ? 1 : 0); 2010c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana dest.writeInt(isAlwaysSyncable ? 1 : 0); 2020c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana dest.writeInt(allowParallelSyncs ? 1 : 0); 203e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana dest.writeString(settingsActivity); 204ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana } 205ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana 206ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public SyncAdapterType(Parcel source) { 207e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana this( 208e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana source.readString(), 209e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana source.readString(), 210e0616ffb741b64e3bc7a1e3ad9def3d50eee53fdFred Quintana source.readInt() != 0, 2110c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana source.readInt() != 0, 2120c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana source.readInt() != 0, 213e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana source.readInt() != 0, 214e6d60ecdf668499f003a81274f18cb57075eb65bFred Quintana source.readString()); 215ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana } 216ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana 217ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public static final Creator<SyncAdapterType> CREATOR = new Creator<SyncAdapterType>() { 218ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public SyncAdapterType createFromParcel(Parcel source) { 219ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana return new SyncAdapterType(source); 220ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana } 221ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana 222ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana public SyncAdapterType[] newArray(int size) { 223ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana return new SyncAdapterType[size]; 224ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana } 225ac9385ef3105fb7464e1f46049c62755a8b7f0e9Fred Quintana }; 2260c4d04ac2e8aa62560d8d767fa1c87e5361b0b08Fred Quintana} 227