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

Commit e52b39ff authored by vadimt's avatar vadimt Committed by Automerger Merge Worker
Browse files

Making LauncherProvider think that clear-db request comes from Launcher am: efa3acdd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11975961

Change-Id: I232d640997772be013900c36aa82479b926016ca
parents 2f987f64 efa3acdd
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Binder;
import android.os.Bundle;
import android.os.Debug;
import android.system.Os;
@@ -171,11 +172,16 @@ public class DebugTestInformationHandler extends TestInformationHandler {
            }

            case TestProtocol.REQUEST_CLEAR_DATA: {
                final long identity = Binder.clearCallingIdentity();
                try {
                    LauncherSettings.Settings.call(mContext.getContentResolver(),
                            LauncherSettings.Settings.METHOD_CREATE_EMPTY_DB);
                    MAIN_EXECUTOR.submit(() ->
                            LauncherAppState.getInstance(mContext).getModel().forceReload());
                    return response;
                } finally {
                    Binder.restoreCallingIdentity(identity);
                }
            }

            default: