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

Commit b0604352 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Rohit Sekhar
Browse files

StorageManagerService: Ignore user storage exceptions for emulator builds

 - RuntimeException throwing and infinite bootloop on emulator builds.
 - Introduced from 2022-07-05 security patch merge

Change-Id: I13eddee2115b95157b65a3e77d11872ad0dd
parent 8f431da1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import android.content.res.ObbInfo;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.DropBoxManager;
import android.os.Environment;
import android.os.Handler;
@@ -3410,6 +3411,11 @@ class StorageManagerService extends IStorageManager.Stub
        } catch (Exception e) {
            EventLog.writeEvent(0x534e4554, "224585613", -1, "");
            Slog.wtf(TAG, e);

            if (Build.IS_EMULATOR) {
                return;
            }

            // Make sure to re-throw this exception; we must not ignore failure
            // to prepare the user storage as it could indicate that encryption
            // wasn't successfully set up.