Merge "Keep lock while binding the storage service" into rvc-dev

This commit is contained in:
Corina Grigoras
2020-06-08 14:16:40 +00:00
committed by Android (Google) Code Review

View File

@@ -413,7 +413,6 @@ public final class StorageUserConnection {
resetUserSessions(); resetUserSessions();
} }
}; };
}
Slog.i(TAG, "Binding to the ExternalStorageService for user " + mUserId); Slog.i(TAG, "Binding to the ExternalStorageService for user " + mUserId);
if (mContext.bindServiceAsUser(new Intent().setComponent(name), mServiceConnection, if (mContext.bindServiceAsUser(new Intent().setComponent(name), mServiceConnection,
@@ -422,14 +421,13 @@ public final class StorageUserConnection {
Slog.i(TAG, "Bound to the ExternalStorageService for user " + mUserId); Slog.i(TAG, "Bound to the ExternalStorageService for user " + mUserId);
return mLatch; return mLatch;
} else { } else {
synchronized (mLock) {
mIsConnecting = false; mIsConnecting = false;
}
throw new ExternalStorageServiceException( throw new ExternalStorageServiceException(
"Failed to bind to the ExternalStorageService for user " + mUserId); "Failed to bind to the ExternalStorageService for user " + mUserId);
} }
} }
} }
}
private static final class Session { private static final class Session {
public final String sessionId; public final String sessionId;