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

Commit cc53f44d authored by Weng Su's avatar Weng Su
Browse files

Revert "Disallow screenshot on Wi-Fi QR code settings"

This reverts commit 950837b2.

Reason for revert: The security issue is downgraded to NSI, remove the screenshot protection to rollback the original design.

Change-Id: Iecaf7e4e19dc3452a7d2aeaf32bf38619e760c76
parent 950837b2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.os.UserManager;
import android.provider.Settings;
import android.util.EventLog;
import android.util.Log;
import android.view.WindowManager;

import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.FragmentTransaction;
@@ -100,7 +99,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);

        if (savedInstanceState != null) {
            String qrCode = savedInstanceState.getString(KEY_QR_CODE);
+0 −10
Original line number Diff line number Diff line
@@ -16,10 +16,6 @@

package com.android.settings.wifi.dpp;

import static android.view.WindowManager.LayoutParams.FLAG_SECURE;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
@@ -76,12 +72,6 @@ public class WifiDppConfiguratorActivityTest {
                Robolectric.setupActivity(WifiDppConfiguratorActivity.class);
    }

    @Test
    public void launchActivity_shouldAddFlagSecure() {
        assertThat(mActivity.getWindow().getAttributes().flags & FLAG_SECURE)
                .isEqualTo(FLAG_SECURE);
    }

    @Test
    public void handleIntent_isGuestUser_shouldFinish() {
        when(mUserManager.isGuestUser()).thenReturn(true);