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

Commit b598fcff authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [7817250, 7817416] into qt-release

Change-Id: I2b9ad8877fc8f99db9b2ea904c59d79b1cdabb11
parents 4b44886a 996c23dc
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -2842,9 +2842,8 @@ class StorageManagerService extends IStorageManager.Stub
        }
    }

    /** Not thread safe */
    class AppFuseMountScope extends AppFuseBridge.MountScope {
        private boolean mMounted = false;
        boolean opened = false;

        public AppFuseMountScope(int uid, int mountId) {
            super(uid, mountId);
@@ -2853,9 +2852,8 @@ class StorageManagerService extends IStorageManager.Stub
        @Override
        public ParcelFileDescriptor open() throws NativeDaemonConnectorException {
            try {
                final FileDescriptor fd = mVold.mountAppFuse(uid, mountId);
                mMounted = true;
                return new ParcelFileDescriptor(fd);
                return new ParcelFileDescriptor(
                        mVold.mountAppFuse(uid, mountId));
            } catch (Exception e) {
                throw new NativeDaemonConnectorException("Failed to mount", e);
            }
@@ -2874,9 +2872,9 @@ class StorageManagerService extends IStorageManager.Stub

        @Override
        public void close() throws Exception {
            if (mMounted) {
            if (opened) {
                mVold.unmountAppFuse(uid, mountId);
                mMounted = false;
                opened = false;
            }
        }
    }