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

Commit 9e31318b authored by Heemin Seog's avatar Heemin Seog
Browse files

Change factoryReset to succeed for Settings

Wrap a part of factoryReset with Binder.withCleanCallingIdentity() so
that it doesn't crash thinking that a different uid connected to the
network stack.

Bug: 135029349
Test: build, manual
Change-Id: Iea246a4c1939a4e7e35434137051835ece81d92f
parent f5432f18
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -6901,8 +6901,10 @@ public class ConnectivityService extends IConnectivityManager.Stub

        final int userId = UserHandle.getCallingUserId();

        Binder.withCleanCallingIdentity(() -> {
            final IpMemoryStore ipMemoryStore = IpMemoryStore.getMemoryStore(mContext);
            ipMemoryStore.factoryReset();
        });

        // Turn airplane mode off
        setAirplaneMode(false);