RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class

Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
This commit is contained in:
kholoud mohamed
2022-03-14 11:11:33 +00:00
parent 45436a025c
commit de78149c16
49 changed files with 160 additions and 139 deletions

View File

@@ -54,7 +54,7 @@ public class RemoteBugreportActivity extends Activity {
if (notificationType == DevicePolicyManager.NOTIFICATION_BUGREPORT_ACCEPTED_NOT_FINISHED) {
AlertDialog dialog = new AlertDialog.Builder(this)
.setMessage(devicePolicyManager.getString(
.setMessage(devicePolicyManager.getResources().getString(
SHARING_REMOTE_BUGREPORT_MESSAGE,
() -> getString(R.string.sharing_remote_bugreport_dialog_message)))
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@@ -85,9 +85,10 @@ public class RemoteBugreportActivity extends Activity {
: SHARE_REMOTE_BUGREPORT_FINISHED_REQUEST_CONSENT;
AlertDialog dialog = new AlertDialog.Builder(this)
.setTitle(devicePolicyManager.getString(SHARE_REMOTE_BUGREPORT_DIALOG_TITLE,
.setTitle(devicePolicyManager.getResources().getString(
SHARE_REMOTE_BUGREPORT_DIALOG_TITLE,
() -> getString(R.string.share_remote_bugreport_dialog_title)))
.setMessage(devicePolicyManager.getString(overrideMessageId,
.setMessage(devicePolicyManager.getResources().getString(overrideMessageId,
() -> getString(defaultMessageId)))
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override