Update MountService to StorageManagerService.

Bug: 30977067
Test: N/A
Change-Id: I8c5eda7ed068bc7c184d559c0a27c52a74094f1a
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 826c20b..49142d7 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -35,7 +35,7 @@
 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 @@
 
         @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 @@
             } 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 @@
 
         @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 @@
                 @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 @@
                 || 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 87189c8..e12ebe0 100644
--- a/src/com/android/settings/CryptKeeperConfirm.java
+++ b/src/com/android/settings/CryptKeeperConfirm.java
@@ -25,7 +25,7 @@
 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 @@
                         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 @@
             // 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 9062e63..b1c81a6 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -54,7 +54,7 @@
 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 @@
 
         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 a102eda..d9e42df 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
@@ -77,7 +77,7 @@
     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) {