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

Commit f6d65708 authored by Faye Yan's avatar Faye Yan Committed by Android Build Coastguard Worker
Browse files

Security fix for VPN app killable via lockscreen.

Do not show the active apps dialog when the screen is locked.
Instead prompt the user to unlock directly if clicked and only open the dialog on
successsful unlock.

Flag: NONE
Bug: 304772709
Test: manually, locked and unlocked
Test: atest com.android.systemui.qs.FooterActionsControllerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0fddfa039dffd62f354def04e43d5a3ef0364aa8)
Merged-In: I071cd9b7d0e779a156795d6af481231c5347101d
Change-Id: I071cd9b7d0e779a156795d6af481231c5347101d
parent 455b552f
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import androidx.annotation.Nullable;
import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.qs.dagger.QSScope;

import java.util.concurrent.Executor;
@@ -51,6 +52,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
    private final Context mContext;
    private final Executor mMainExecutor;
    private final Executor mExecutor;
    private final ActivityStarter mActivityStarter;

    private final FgsManagerController mFgsManagerController;

@@ -69,7 +71,8 @@ public class QSFgsManagerFooter implements View.OnClickListener,
    @Inject
    QSFgsManagerFooter(@Named(QS_FGS_MANAGER_FOOTER_VIEW) View rootView,
            @Main Executor mainExecutor, @Background Executor executor,
            FgsManagerController fgsManagerController) {
            FgsManagerController fgsManagerController,
            ActivityStarter activityStarter) {
        mRootView = rootView;
        mFooterText = mRootView.findViewById(R.id.footer_text);
        mTextContainer = mRootView.findViewById(R.id.fgs_text_container);
@@ -81,6 +84,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
        mMainExecutor = mainExecutor;
        mExecutor = executor;
        mFgsManagerController = fgsManagerController;
        mActivityStarter = activityStarter;
    }

    /**
@@ -128,7 +132,14 @@ public class QSFgsManagerFooter implements View.OnClickListener,

    @Override
    public void onClick(View view) {
        mActivityStarter.dismissKeyguardThenExecute(
            () -> {
                mFgsManagerController.showDialog(mRootView);
                return false /* if the dismiss should be deferred */;
            },
            null /* cancelAction */,
            true /* afterKeyguardGone */
        );
    }

    public void refreshState() {