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

Commit 2e2a484a authored by Stanley Wang's avatar Stanley Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix the problem that apps can read SIM card information through screenshots." into tm-dev

parents e2f0df2e 2b7cadac
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.appcompat.app.AlertDialog;
@@ -75,7 +76,12 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
        mRootView = LayoutInflater.from(builder.getContext())
                .inflate(R.layout.dialog_sim_status, null /* parent */);
        mController.initialize();
        return builder.setView(mRootView).create();

        Dialog dlg = builder.setView(mRootView).create();
        dlg.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
                WindowManager.LayoutParams.FLAG_SECURE);

        return dlg;
    }

    @Override
@@ -107,8 +113,7 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
        }
        if (TextUtils.isEmpty(text)) {
            text = getResources().getString(R.string.device_info_default);
        }
        else if (Arrays.binarySearch(sViewIdsInDigitFormat, viewId) >= 0) {
        } else if (Arrays.binarySearch(sViewIdsInDigitFormat, viewId) >= 0) {
            text = PhoneNumberUtil.expandByTts(text);
        }
        textView.setText(text);