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

Commit f1b6e8c5 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "Fix RestartDialog Regression" into main

parents 83cf42ea d887d93a
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -16,14 +16,12 @@

package com.android.wm.shell.compatui;

import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING;
import static android.window.TaskConstants.TASK_CHILD_LAYER_COMPAT_UI;

import android.annotation.Nullable;
import android.app.TaskInfo;
import android.content.Context;
import android.graphics.Rect;
import android.provider.Settings;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
@@ -120,7 +118,7 @@ class RestartDialogWindowManager extends CompatUIWindowManagerAbstract {
    @Override
    protected boolean eligibleToShowLayout() {
        // We don't show this dialog if the user has explicitly selected so clicking on a checkbox.
        return mRequestRestartDialog && !isTaskbarEduShowing() && (mLayout != null
        return mRequestRestartDialog && (mLayout != null
                || mCompatUIConfiguration.shouldShowRestartDialogAgain(getLastTaskInfo()));
    }

@@ -243,10 +241,4 @@ class RestartDialogWindowManager extends CompatUIWindowManagerAbstract {
        return getWindowLayoutParams(/* width= */ taskBounds.width(), /* height= */
                taskBounds.height());
    }

    @VisibleForTesting
    boolean isTaskbarEduShowing() {
        return Settings.Secure.getInt(mContext.getContentResolver(),
                LAUNCHER_TASKBAR_EDUCATION_SHOWING, /* def= */ 0) == 1;
    }
}