Java Code Examples for android.os.storage.StorageManager#UUID_PRIMARY_PHYSICAL
The following examples show how to use
android.os.storage.StorageManager#UUID_PRIMARY_PHYSICAL .
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: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 2
Source File: ApplicationPackageManager.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 3
Source File: ApplicationPackageManager.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 4
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 5
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 6
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 7
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 8
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 9
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 10
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 11
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 12
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 13
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 14
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } }
Example 15
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } }
Example 16
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 17
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePackage(String packageName, VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePackage(packageName, volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 18
Source File: ApplicationPackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 6 votes |
@Override public int movePrimaryStorage(VolumeInfo vol) { try { final String volumeUuid; if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { volumeUuid = StorageManager.UUID_PRIVATE_INTERNAL; } else if (vol.isPrimaryPhysical()) { volumeUuid = StorageManager.UUID_PRIMARY_PHYSICAL; } else { volumeUuid = Preconditions.checkNotNull(vol.fsUuid); } return mPM.movePrimaryStorage(volumeUuid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
Example 19
Source File: StorageManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private String getDefaultPrimaryStorageUuid() { if (SystemProperties.getBoolean(StorageManager.PROP_PRIMARY_PHYSICAL, false)) { return StorageManager.UUID_PRIMARY_PHYSICAL; } else { return StorageManager.UUID_PRIVATE_INTERNAL; } }
Example 20
Source File: PermissionManagerService.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private static String getVolumeUuidForPackage(PackageParser.Package pkg) { if (pkg == null) { return StorageManager.UUID_PRIVATE_INTERNAL; } if (pkg.isExternal()) { if (TextUtils.isEmpty(pkg.volumeUuid)) { return StorageManager.UUID_PRIMARY_PHYSICAL; } else { return pkg.volumeUuid; } } else { return StorageManager.UUID_PRIVATE_INTERNAL; } }