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

Commit 92d5e580 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: 52f9039d am:...

Prevent HTML Injection on the Device Admin request screen am: 52f9039d am: 6ac45a7c am: f470b78f

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

Change-Id: If97943cb25cbbe5388a9b5d28faa50b4df156aad
parents f7682416 f470b78f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ public class DeviceAdminAdd extends Activity {
    DevicePolicyManager mDPM;
    AppOpsManager mAppOps;
    DeviceAdminInfo mDeviceAdmin;
    CharSequence mAddMsgText;
    String mAddMsgText;
    String mProfileOwnerName;

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

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

        if (mAddingProfileOwner) {
            // If we're trying to add a profile owner and user setup hasn't completed yet, no
@@ -628,7 +632,7 @@ public class DeviceAdminAdd extends Activity {
        } catch (Resources.NotFoundException e) {
            mAdminDescription.setVisibility(View.GONE);
        }
        if (mAddMsgText != null) {
        if (!TextUtils.isEmpty(mAddMsgText)) {
            mAddMsg.setText(mAddMsgText);
            mAddMsg.setVisibility(View.VISIBLE);
        } else {