Loading services/core/java/com/android/server/StorageManagerService.java +18 −7 Original line number Diff line number Diff line Loading @@ -1557,10 +1557,11 @@ class StorageManagerService extends IStorageManager.Stub } private void start() { connect(); connectStoraged(); connectVold(); } private void connect() { private void connectStoraged() { IBinder binder = ServiceManager.getService("storaged"); if (binder != null) { try { Loading @@ -1569,7 +1570,7 @@ class StorageManagerService extends IStorageManager.Stub public void binderDied() { Slog.w(TAG, "storaged died; reconnecting"); mStoraged = null; connect(); connectStoraged(); } }, 0); } catch (RemoteException e) { Loading @@ -1583,7 +1584,17 @@ class StorageManagerService extends IStorageManager.Stub Slog.w(TAG, "storaged not found; trying again"); } binder = ServiceManager.getService("vold"); if (mStoraged == null) { BackgroundThread.getHandler().postDelayed(() -> { connectStoraged(); }, DateUtils.SECOND_IN_MILLIS); } else { onDaemonConnected(); } } private void connectVold() { IBinder binder = ServiceManager.getService("vold"); if (binder != null) { try { binder.linkToDeath(new DeathRecipient() { Loading @@ -1591,7 +1602,7 @@ class StorageManagerService extends IStorageManager.Stub public void binderDied() { Slog.w(TAG, "vold died; reconnecting"); mVold = null; connect(); connectVold(); } }, 0); } catch (RemoteException e) { Loading @@ -1611,9 +1622,9 @@ class StorageManagerService extends IStorageManager.Stub Slog.w(TAG, "vold not found; trying again"); } if (mStoraged == null || mVold == null) { if (mVold == null) { BackgroundThread.getHandler().postDelayed(() -> { connect(); connectVold(); }, DateUtils.SECOND_IN_MILLIS); } else { onDaemonConnected(); Loading Loading
services/core/java/com/android/server/StorageManagerService.java +18 −7 Original line number Diff line number Diff line Loading @@ -1557,10 +1557,11 @@ class StorageManagerService extends IStorageManager.Stub } private void start() { connect(); connectStoraged(); connectVold(); } private void connect() { private void connectStoraged() { IBinder binder = ServiceManager.getService("storaged"); if (binder != null) { try { Loading @@ -1569,7 +1570,7 @@ class StorageManagerService extends IStorageManager.Stub public void binderDied() { Slog.w(TAG, "storaged died; reconnecting"); mStoraged = null; connect(); connectStoraged(); } }, 0); } catch (RemoteException e) { Loading @@ -1583,7 +1584,17 @@ class StorageManagerService extends IStorageManager.Stub Slog.w(TAG, "storaged not found; trying again"); } binder = ServiceManager.getService("vold"); if (mStoraged == null) { BackgroundThread.getHandler().postDelayed(() -> { connectStoraged(); }, DateUtils.SECOND_IN_MILLIS); } else { onDaemonConnected(); } } private void connectVold() { IBinder binder = ServiceManager.getService("vold"); if (binder != null) { try { binder.linkToDeath(new DeathRecipient() { Loading @@ -1591,7 +1602,7 @@ class StorageManagerService extends IStorageManager.Stub public void binderDied() { Slog.w(TAG, "vold died; reconnecting"); mVold = null; connect(); connectVold(); } }, 0); } catch (RemoteException e) { Loading @@ -1611,9 +1622,9 @@ class StorageManagerService extends IStorageManager.Stub Slog.w(TAG, "vold not found; trying again"); } if (mStoraged == null || mVold == null) { if (mVold == null) { BackgroundThread.getHandler().postDelayed(() -> { connect(); connectVold(); }, DateUtils.SECOND_IN_MILLIS); } else { onDaemonConnected(); Loading