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

Commit 996c23dc authored by Daniel Chapin's avatar Daniel Chapin Committed by android-build-team Robot
Browse files

Revert "Fix AppFuseMountScope.close()"

This reverts commit be9c9900.

Reason for revert: b/134032662

Change-Id: I7132ba078d44ba424bc8a9bf6874f8077738b22d
(cherry picked from commit e890b9793b4f0d7d139a5e78a5c46735b2cf04c2)
parent 4b44886a
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;
            }
        }
    }