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

Commit 26f3013c authored by Tsung-Mao Fang's avatar Tsung-Mao Fang Committed by Automerger Merge Worker
Browse files

Prevent HTML Injection on the Device Admin request screen am: 80c3f6d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14167794

Change-Id: Iac38c0d7f7517c8d4ecac036e73524d37c66fb6e
parents d2ee0db5 80c3f6d4
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public class DeviceAdminAdd extends Activity {
    DevicePolicyManager mDPM;
    AppOpsManager mAppOps;
    DeviceAdminInfo mDeviceAdmin;
    CharSequence mAddMsgText;
    String mAddMsgText;
    String mProfileOwnerName;

    ImageView mAdminIcon;
@@ -276,7 +276,11 @@ public class DeviceAdminAdd extends Activity {
            return;
        }

        mAddMsgText = getIntent().getCharSequenceExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION);
        final CharSequence addMsgCharSequence = getIntent().getCharSequenceExtra(
                DevicePolicyManager.EXTRA_ADD_EXPLANATION);
        if (addMsgCharSequence != null) {
            mAddMsgText = addMsgCharSequence.toString();
        }

        setContentView(R.layout.device_admin_add);

@@ -568,7 +572,7 @@ public class DeviceAdminAdd extends Activity {
        if (mAddingProfileOwner) {
            mProfileOwnerWarning.setVisibility(View.VISIBLE);
        }
        if (mAddMsgText != null) {
         if (!TextUtils.isEmpty(mAddMsgText)) {
            mAddMsg.setText(mAddMsgText);
            mAddMsg.setVisibility(View.VISIBLE);
        } else {