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

Commit ac7c1e37 authored by Jakob Schneider's avatar Jakob Schneider Committed by Android (Google) Code Review
Browse files

Merge "Initialize the archiving compat options during launcher3 startup." into main

parents dc239662 2f609d09
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ public class LauncherAppState implements SafeCloseable {
        return mContext;
    }

    @SuppressWarnings("NewApi")
    public LauncherAppState(Context context) {
        this(context, LauncherFiles.APP_ICONS_DB);
        Log.v(Launcher.TAG, "LauncherAppState initiated");
@@ -103,9 +104,14 @@ public class LauncherAppState implements SafeCloseable {
        });

        ModelLauncherCallbacks callbacks = mModel.newModelCallbacks();
        mContext.getSystemService(LauncherApps.class).registerCallback(callbacks);
        LauncherApps launcherApps = mContext.getSystemService(LauncherApps.class);
        launcherApps.registerCallback(callbacks);
        mOnTerminateCallback.add(() ->
                mContext.getSystemService(LauncherApps.class).unregisterCallback(callbacks));
        if (Flags.enableSupportForArchiving()) {
            launcherApps.setArchiveCompatibilityOptions(/* enableIconOverlay= */ true,
                    /* enableUnarchivalConfirmation= */ false);
        }

        SimpleBroadcastReceiver modelChangeReceiver =
                new SimpleBroadcastReceiver(mModel::onBroadcastIntent);