From 4f1a24db0c06bf339b6083615bc615ec69c6897d Mon Sep 17 00:00:00 2001 From: Zim Date: Wed, 27 Nov 2019 16:35:58 +0000 Subject: [PATCH] Skip remountUid for system_server Several processes share the system_server uid. Since it has all access it wants. No need to remountUid for apps sharing that uid Test: manual Bug: 141678467 Change-Id: Iab35e41d54e4d82eccfc8d8ca052aa93157e8b49 --- .../core/java/com/android/server/StorageManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index d8ae1e41a2539..5d8c97586fe48 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -2203,6 +2203,11 @@ class StorageManagerService extends IStorageManager.Stub } private void remountUidExternalStorage(int uid, int mode) { + if (uid == Process.SYSTEM_UID) { + // No need to remount uid for system because it has all access anyways + return; + } + try { mVold.remountUid(uid, mode); } catch (Exception e) {