Prevent HTML Injection on the Device Admin request screen am: 80c3f6d4d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14167794 Change-Id: Iac38c0d7f7517c8d4ecac036e73524d37c66fb6e
This commit is contained in:
@@ -97,7 +97,7 @@ public class DeviceAdminAdd extends Activity {
|
|||||||
DevicePolicyManager mDPM;
|
DevicePolicyManager mDPM;
|
||||||
AppOpsManager mAppOps;
|
AppOpsManager mAppOps;
|
||||||
DeviceAdminInfo mDeviceAdmin;
|
DeviceAdminInfo mDeviceAdmin;
|
||||||
CharSequence mAddMsgText;
|
String mAddMsgText;
|
||||||
String mProfileOwnerName;
|
String mProfileOwnerName;
|
||||||
|
|
||||||
ImageView mAdminIcon;
|
ImageView mAdminIcon;
|
||||||
@@ -276,7 +276,11 @@ public class DeviceAdminAdd extends Activity {
|
|||||||
return;
|
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);
|
setContentView(R.layout.device_admin_add);
|
||||||
|
|
||||||
@@ -568,7 +572,7 @@ public class DeviceAdminAdd extends Activity {
|
|||||||
if (mAddingProfileOwner) {
|
if (mAddingProfileOwner) {
|
||||||
mProfileOwnerWarning.setVisibility(View.VISIBLE);
|
mProfileOwnerWarning.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if (mAddMsgText != null) {
|
if (!TextUtils.isEmpty(mAddMsgText)) {
|
||||||
mAddMsg.setText(mAddMsgText);
|
mAddMsg.setText(mAddMsgText);
|
||||||
mAddMsg.setVisibility(View.VISIBLE);
|
mAddMsg.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user