Merge "Add content description to owner info status text" into mnc-dev

This commit is contained in:
Jason Monk
2015-06-19 15:22:20 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 1 deletions

View File

@@ -6845,4 +6845,7 @@
<!-- Warning message about disabling usage access on profile owner [CHAR LIMIT=NONE] -->
<string name="work_profile_usage_access_warning">Turning off usage access for this app doesn\u2019t prevent your administrator tracking data usage for apps in your work profile.</string>
<!-- Number of characters used for lock screen text [CHAR LIMIT=NONE] -->
<string name="accessibility_lock_screen_progress"><xliff:g id="count" example="1">%1$d</xliff:g> of <xliff:g id="count" example="1">%2$d</xliff:g> characters used</string>
</resources>

View File

@@ -92,9 +92,13 @@ public class OwnerInfoSettings extends DialogFragment implements OnClickListener
}
private void updateOwnerInfoStatus() {
int chars = mOwnerInfo.getText().toString().length();
String status = getString(R.string.owner_info_settings_status,
mOwnerInfo.getText().toString().length(), MAX_CHARS);
chars, MAX_CHARS);
String accessibilityStatus = getString(R.string.accessibility_lock_screen_progress,
chars, MAX_CHARS);
mOwnerInfoStatus.setText(status);
mOwnerInfoStatus.setContentDescription(accessibilityStatus);
}
@Override