Java Code Examples for android.os.Parcel#readSparseArray()

The following examples show how to use android.os.Parcel#readSparseArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InstrumentationInfo.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private InstrumentationInfo(Parcel source) {
    super(source);
    targetPackage = source.readString();
    targetProcesses = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    handleProfiling = source.readInt() != 0;
    functionalTest = source.readInt() != 0;
}
 
Example 2
Source File: StaggeredGridView.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor called from {@link #CREATOR}
 */
public GridListSavedState(Parcel in) {
    super(in);
    columnCount = in.readInt();
    columnTops = new int[columnCount >= 0 ? columnCount : 0];
    in.readIntArray(columnTops);
    positionData = in.readSparseArray(GridItemRecord.class.getClassLoader());
}
 
Example 3
Source File: StaggeredGridView.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor called from {@link #CREATOR}
 */
public GridListSavedState(Parcel in) {
    super(in);
    columnCount = in.readInt();
    columnTops = new int[columnCount >= 0 ? columnCount : 0];
    in.readIntArray(columnTops);
    positionData = in.readSparseArray(GridItemRecord.class.getClassLoader());
}
 
Example 4
Source File: ParcelledState.java    From simple-stack with Apache License 2.0 5 votes vote down vote up
protected ParcelledState(Parcel in) {
    parcelableKey = in.readParcelable(getClass().getClassLoader());
    // noinspection unchecked
    viewHierarchyState = in.readSparseArray(getClass().getClassLoader());
    boolean hasBundle = in.readByte() > 0;
    if(hasBundle) {
        bundle = in.readParcelable(getClass().getClassLoader());
    }
    boolean hasViewBundle = in.readByte() > 0;
    if(hasViewBundle) {
        viewBundle = in.readParcelable(getClass().getClassLoader());
    }
}
 
Example 5
Source File: ParcelableContainer.java    From ChipsLayoutManager with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private ParcelableContainer(Parcel parcel) {
    anchorViewState = AnchorViewState.CREATOR.createFromParcel(parcel);
    orientationCacheMap = parcel.readSparseArray(CacheParcelableContainer.class.getClassLoader());
    cacheNormalizationPositionMap = parcel.readSparseArray(Integer.class.getClassLoader());
    orientation = parcel.readInt();
}
 
Example 6
Source File: StaggeredGridView.java    From PullToRefreshLibrary with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor called from {@link #CREATOR}
 */
public GridListSavedState(Parcel in) {
    super(in);
    columnCount = in.readInt();
    columnTops = new int[columnCount >= 0 ? columnCount : 0];
    in.readIntArray(columnTops);
    positionData = in.readSparseArray(GridItemRecord.class.getClassLoader());
}
 
Example 7
Source File: FloatingNavigationView.java    From Floating-Navigation-View with Apache License 2.0 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader loader) {
    super(in, loader);
    navigationViewState = in.readSparseArray(loader);
    opened = (Boolean) in.readValue(loader);
}
 
Example 8
Source File: CreditCardForm.java    From CreditCardEntry with MIT License 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader classLoader) {
	super(in);
	childrenStates = in.readSparseArray(classLoader);
}
 
Example 9
Source File: CreditCardEntry.java    From CreditCardEntry with MIT License 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader classLoader) {
    super(in);
    childrenStates = in.readSparseArray(classLoader);
}
 
Example 10
Source File: SparseParcelable.java    From android-parcelable-intellij-plugin with Apache License 2.0 4 votes vote down vote up
protected SparseParcelable(Parcel in) {
    this.sampleSparseArray = in.readSparseArray(String.class.getClassLoader());
    this.sparseBooleanArray = in.readSparseBooleanArray();
}
 
Example 11
Source File: MyCustomLayout.java    From ViewStateSaveDemo with Apache License 2.0 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader classLoader) {
    super(in);
    childrenStates = in.readSparseArray(classLoader);
}
 
Example 12
Source File: PersistentSearchView.java    From PersistentSearchView with Apache License 2.0 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader classLoader) {
    super(in);
    childrenStates = in.readSparseArray(classLoader);
    mCurrentSearchViewState = SearchViewState.fromInt(in.readInt());
}
 
Example 13
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
private ApplicationInfo(Parcel source) {
    super(source);
    taskAffinity = source.readString();
    permission = source.readString();
    processName = source.readString();
    className = source.readString();
    theme = source.readInt();
    flags = source.readInt();
    privateFlags = source.readInt();
    requiresSmallestWidthDp = source.readInt();
    compatibleWidthLimitDp = source.readInt();
    largestWidthLimitDp = source.readInt();
    if (source.readInt() != 0) {
        storageUuid = new UUID(source.readLong(), source.readLong());
        volumeUuid = StorageManager.convert(storageUuid);
    }
    scanSourceDir = source.readString();
    scanPublicSourceDir = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    nativeLibraryRootDir = source.readString();
    nativeLibraryRootRequiresIsa = source.readInt() != 0;
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    resourceDirs = source.readStringArray();
    seInfo = source.readString();
    seInfoUser = source.readString();
    sharedLibraryFiles = source.readStringArray();
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    uid = source.readInt();
    minSdkVersion = source.readInt();
    targetSdkVersion = source.readInt();
    versionCode = source.readInt();
    enabled = source.readInt() != 0;
    enabledSetting = source.readInt();
    installLocation = source.readInt();
    manageSpaceActivityName = source.readString();
    backupAgentName = source.readString();
    descriptionRes = source.readInt();
    uiOptions = source.readInt();
    fullBackupContent = source.readInt();
    networkSecurityConfigRes = source.readInt();
    category = source.readInt();
    targetSandboxVersion = source.readInt();
}
 
Example 14
Source File: NiboPlacesAutoCompleteSearchView.java    From Nibo with MIT License 4 votes vote down vote up
private SavedState(Parcel in, ClassLoader classLoader) {
    super(in);
    childrenStates = in.readSparseArray(classLoader);
    mCurrentSearchViewState = SearchViewState.fromInt(in.readInt());
}
 
Example 15
Source File: IsolatedLayoutSaveState.java    From QNotified with GNU General Public License v3.0 4 votes vote down vote up
public IsolatedLayoutSaveState(Parcel source) {
    super(source);
    childStates = source.readSparseArray(Initiator.getPluginClassLoader());
}
 
Example 16
Source File: ApplicationInfo.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
private ApplicationInfo(Parcel source) {
    super(source);
    taskAffinity = source.readString();
    permission = source.readString();
    processName = source.readString();
    className = source.readString();
    theme = source.readInt();
    flags = source.readInt();
    privateFlags = source.readInt();
    requiresSmallestWidthDp = source.readInt();
    compatibleWidthLimitDp = source.readInt();
    largestWidthLimitDp = source.readInt();
    if (source.readInt() != 0) {
        storageUuid = new UUID(source.readLong(), source.readLong());
        volumeUuid = StorageManager.convert(storageUuid);
    }
    scanSourceDir = source.readString();
    scanPublicSourceDir = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    nativeLibraryRootDir = source.readString();
    nativeLibraryRootRequiresIsa = source.readInt() != 0;
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    resourceDirs = source.readStringArray();
    seInfo = source.readString();
    seInfoUser = source.readString();
    sharedLibraryFiles = source.readStringArray();
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    uid = source.readInt();
    minSdkVersion = source.readInt();
    targetSdkVersion = source.readInt();
    setVersionCode(source.readLong());
    enabled = source.readInt() != 0;
    enabledSetting = source.readInt();
    installLocation = source.readInt();
    manageSpaceActivityName = source.readString();
    backupAgentName = source.readString();
    descriptionRes = source.readInt();
    uiOptions = source.readInt();
    fullBackupContent = source.readInt();
    networkSecurityConfigRes = source.readInt();
    category = source.readInt();
    targetSandboxVersion = source.readInt();
    classLoaderName = source.readString();
    splitClassLoaderNames = source.readStringArray();
    compileSdkVersion = source.readInt();
    compileSdkVersionCodename = source.readString();
    appComponentFactory = source.readString();
    mHiddenApiPolicy = source.readInt();
    hiddenUntilInstalled = source.readInt() != 0;
}
 
Example 17
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
private ApplicationInfo(Parcel source) {
    super(source);
    taskAffinity = source.readString();
    permission = source.readString();
    processName = source.readString();
    className = source.readString();
    theme = source.readInt();
    flags = source.readInt();
    privateFlags = source.readInt();
    requiresSmallestWidthDp = source.readInt();
    compatibleWidthLimitDp = source.readInt();
    largestWidthLimitDp = source.readInt();
    if (source.readInt() != 0) {
        storageUuid = new UUID(source.readLong(), source.readLong());
        volumeUuid = StorageManager.convert(storageUuid);
    }
    scanSourceDir = source.readString();
    scanPublicSourceDir = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    nativeLibraryRootDir = source.readString();
    nativeLibraryRootRequiresIsa = source.readInt() != 0;
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    resourceDirs = source.readStringArray();
    seInfo = source.readString();
    seInfoUser = source.readString();
    sharedLibraryFiles = source.readStringArray();
    sharedLibraryInfos = source.createTypedArrayList(SharedLibraryInfo.CREATOR);
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    uid = source.readInt();
    minSdkVersion = source.readInt();
    targetSdkVersion = source.readInt();
    setVersionCode(source.readLong());
    enabled = source.readInt() != 0;
    enabledSetting = source.readInt();
    installLocation = source.readInt();
    manageSpaceActivityName = source.readString();
    backupAgentName = source.readString();
    descriptionRes = source.readInt();
    uiOptions = source.readInt();
    fullBackupContent = source.readInt();
    networkSecurityConfigRes = source.readInt();
    category = source.readInt();
    targetSandboxVersion = source.readInt();
    classLoaderName = source.readString();
    splitClassLoaderNames = source.readStringArray();
    compileSdkVersion = source.readInt();
    compileSdkVersionCodename = source.readString();
    appComponentFactory = source.readString();
    iconRes = source.readInt();
    roundIconRes = source.readInt();
    mHiddenApiPolicy = source.readInt();
    hiddenUntilInstalled = source.readInt() != 0;
    zygotePreloadName = source.readString();
}
 
Example 18
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
private ApplicationInfo(Parcel source) {
    super(source);
    taskAffinity = source.readString();
    permission = source.readString();
    processName = source.readString();
    className = source.readString();
    theme = source.readInt();
    flags = source.readInt();
    privateFlags = source.readInt();
    requiresSmallestWidthDp = source.readInt();
    compatibleWidthLimitDp = source.readInt();
    largestWidthLimitDp = source.readInt();
    if (source.readInt() != 0) {
        storageUuid = new UUID(source.readLong(), source.readLong());
        volumeUuid = StorageManager.convert(storageUuid);
    }
    scanSourceDir = source.readString();
    scanPublicSourceDir = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    nativeLibraryRootDir = source.readString();
    nativeLibraryRootRequiresIsa = source.readInt() != 0;
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    resourceDirs = source.readStringArray();
    seInfo = source.readString();
    seInfoUser = source.readString();
    sharedLibraryFiles = source.readStringArray();
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    uid = source.readInt();
    minSdkVersion = source.readInt();
    targetSdkVersion = source.readInt();
    versionCode = source.readInt();
    enabled = source.readInt() != 0;
    enabledSetting = source.readInt();
    installLocation = source.readInt();
    manageSpaceActivityName = source.readString();
    backupAgentName = source.readString();
    descriptionRes = source.readInt();
    uiOptions = source.readInt();
    fullBackupContent = source.readInt();
    networkSecurityConfigRes = source.readInt();
    category = source.readInt();
    targetSandboxVersion = source.readInt();
    classLoaderName = source.readString();
    splitClassLoaderNames = source.readStringArray();
}
 
Example 19
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
private ApplicationInfo(Parcel source) {
    super(source);
    taskAffinity = source.readString();
    permission = source.readString();
    processName = source.readString();
    className = source.readString();
    theme = source.readInt();
    flags = source.readInt();
    privateFlags = source.readInt();
    requiresSmallestWidthDp = source.readInt();
    compatibleWidthLimitDp = source.readInt();
    largestWidthLimitDp = source.readInt();
    if (source.readInt() != 0) {
        storageUuid = new UUID(source.readLong(), source.readLong());
        volumeUuid = StorageManager.convert(storageUuid);
    }
    scanSourceDir = source.readString();
    scanPublicSourceDir = source.readString();
    sourceDir = source.readString();
    publicSourceDir = source.readString();
    splitNames = source.readStringArray();
    splitSourceDirs = source.readStringArray();
    splitPublicSourceDirs = source.readStringArray();
    splitDependencies = source.readSparseArray(null);
    nativeLibraryDir = source.readString();
    secondaryNativeLibraryDir = source.readString();
    nativeLibraryRootDir = source.readString();
    nativeLibraryRootRequiresIsa = source.readInt() != 0;
    primaryCpuAbi = source.readString();
    secondaryCpuAbi = source.readString();
    resourceDirs = source.readStringArray();
    seInfo = source.readString();
    seInfoUser = source.readString();
    sharedLibraryFiles = source.readStringArray();
    dataDir = source.readString();
    deviceProtectedDataDir = source.readString();
    credentialProtectedDataDir = source.readString();
    uid = source.readInt();
    minSdkVersion = source.readInt();
    targetSdkVersion = source.readInt();
    setVersionCode(source.readLong());
    enabled = source.readInt() != 0;
    enabledSetting = source.readInt();
    installLocation = source.readInt();
    manageSpaceActivityName = source.readString();
    backupAgentName = source.readString();
    descriptionRes = source.readInt();
    uiOptions = source.readInt();
    fullBackupContent = source.readInt();
    networkSecurityConfigRes = source.readInt();
    category = source.readInt();
    targetSandboxVersion = source.readInt();
    classLoaderName = source.readString();
    splitClassLoaderNames = source.readStringArray();
    compileSdkVersion = source.readInt();
    compileSdkVersionCodename = source.readString();
    appComponentFactory = source.readString();
    mHiddenApiPolicy = source.readInt();
}