diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java index 826c20be169..49142d7c26c 100644 --- a/src/com/android/settings/CryptKeeper.java +++ b/src/com/android/settings/CryptKeeper.java @@ -35,7 +35,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.os.UserHandle; -import android.os.storage.IMountService; +import android.os.storage.IStorageManager; import android.os.storage.StorageManager; import android.provider.Settings; import android.telecom.TelecomManager; @@ -182,7 +182,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList @Override protected Integer doInBackground(String... params) { - final IMountService service = getMountService(); + final IStorageManager service = getStorageManager(); try { return service.decryptStorage(params[0]); } catch (Exception e) { @@ -253,7 +253,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList } else { int passwordType = StorageManager.CRYPT_TYPE_PASSWORD; try { - final IMountService service = getMountService(); + final IStorageManager service = getStorageManager(); passwordType = service.getPasswordType(); } catch (Exception e) { Log.e(TAG, "Error calling mount service " + e); @@ -289,7 +289,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList @Override protected Boolean doInBackground(Void... params) { - final IMountService service = getMountService(); + final IStorageManager service = getStorageManager(); try { Log.d(TAG, "Validating encryption state."); state = service.getEncryptionState(); @@ -483,7 +483,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList @Override public Void doInBackground(Void... v) { try { - final IMountService service = getMountService(); + final IStorageManager service = getStorageManager(); passwordType = service.getPasswordType(); owner_info = service.getField(StorageManager.OWNER_INFO_KEY); pattern_visible = !("0".equals(service.getField(StorageManager.PATTERN_VISIBLE_KEY))); @@ -865,10 +865,10 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList || imm.getEnabledInputMethodSubtypeList(null, false).size() > 1; } - private IMountService getMountService() { + private IStorageManager getStorageManager() { final IBinder service = ServiceManager.getService("mount"); if (service != null) { - return IMountService.Stub.asInterface(service); + return IStorageManager.Stub.asInterface(service); } return null; } diff --git a/src/com/android/settings/CryptKeeperConfirm.java b/src/com/android/settings/CryptKeeperConfirm.java index 87189c8657e..e12ebe07ac8 100644 --- a/src/com/android/settings/CryptKeeperConfirm.java +++ b/src/com/android/settings/CryptKeeperConfirm.java @@ -25,7 +25,7 @@ import android.os.Handler; import android.os.IBinder; import android.os.ServiceManager; import android.os.UserHandle; -import android.os.storage.IMountService; +import android.os.storage.IStorageManager; import android.provider.Settings; import android.util.Log; import android.view.LayoutInflater; @@ -83,10 +83,10 @@ public class CryptKeeperConfirm extends InstrumentedFragment { return; } - IMountService mountService = IMountService.Stub.asInterface(service); + IStorageManager storageManager = IStorageManager.Stub.asInterface(service); try { Bundle args = getIntent().getExtras(); - mountService.encryptStorage(args.getInt("type", -1), args.getString("password")); + storageManager.encryptStorage(args.getInt("type", -1), args.getString("password")); } catch (Exception e) { Log.e("CryptKeeper", "Error while encrypting...", e); } @@ -140,8 +140,8 @@ public class CryptKeeperConfirm extends InstrumentedFragment { // 2. The system locale. try { IBinder service = ServiceManager.getService("mount"); - IMountService mountService = IMountService.Stub.asInterface(service); - mountService.setField("SystemLocale", Locale.getDefault().toLanguageTag()); + IStorageManager storageManager = IStorageManager.Stub.asInterface(service); + storageManager.setField("SystemLocale", Locale.getDefault().toLanguageTag()); } catch (Exception e) { Log.e(TAG, "Error storing locale for decryption UI", e); } diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 9062e634909..b1c81a6a14d 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -54,7 +54,7 @@ import android.os.StrictMode; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; -import android.os.storage.IMountService; +import android.os.storage.IStorageManager; import android.provider.SearchIndexableResource; import android.provider.Settings; import android.service.persistentdata.PersistentDataBlockManager; @@ -489,8 +489,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment try { IBinder service = ServiceManager.getService("mount"); - IMountService mountService = IMountService.Stub.asInterface(service); - if (!mountService.isConvertibleToFBE()) { + IStorageManager storageManager = IStorageManager.Stub.asInterface(service); + if (!storageManager.isConvertibleToFBE()) { removePreference(KEY_CONVERT_FBE); } else if ("file".equals(SystemProperties.get("ro.crypto.type", "none"))) { convertFbePreference.setEnabled(false); diff --git a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java index a102eda775e..d9e42dff770 100644 --- a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java +++ b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java @@ -77,7 +77,7 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase { public void onNavigateNext() { int moveId; - // We only expect exceptions from MountService#setPrimaryStorageUuid + // We only expect exceptions from StorageManagerService#setPrimaryStorageUuid try { moveId = getPackageManager().movePrimaryStorage(mVolume); } catch (IllegalArgumentException e) {