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

Commit f470b78f 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: 6ac45a7c

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

Change-Id: I4dd08163fb97a16c88aa23bdc39851b327034940
parents be6b904e 6ac45a7c
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 {