Skip to content

Commit aecbcd3

Browse files
committed
Fix build: getResources().getQuantityString()
Change-Id: Ic063de610c0087180d66716d6aa75e5fd567abdf
1 parent 24c6b35 commit aecbcd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/afwsamples/testdpc/DeviceAdminReceiver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ public void onPasswordFailed(Context context, Intent intent) {
248248
int attempts = devicePolicyManager.getCurrentFailedPasswordAttempts();
249249
int maxAttempts = devicePolicyManager.getMaximumFailedPasswordsForWipe(null);
250250

251-
String title = context.getQuantityString(
251+
String title = context.getResources().getQuantityString(
252252
R.plurals.password_failed_attempts_title, attempts, attempts);
253253
String content = maxAttempts == 0
254254
? context.getString(R.string.password_failed_no_limit_set)
255-
: context.getQuantityString(
255+
: context.getResources().getQuantityString(
256256
R.plurals.password_failed_attempts_content, maxAttempts, maxAttempts);
257257

258258
Notification.Builder warn = new Notification.Builder(context)

0 commit comments

Comments
 (0)