Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdde51ea authored by Corina Grigoras's avatar Corina Grigoras Committed by Android (Google) Code Review
Browse files

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

parents f909d9f0 63f037cd
Loading
Loading
Loading
Loading
+9 −11
Original line number Original line Diff line number Diff line
@@ -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;