summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2016-05-25 21:11:46 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-25 21:11:46 +0000
commit0c811b8f46e6816cce9bff2a1b67d5b7037e6397 (patch)
tree4f183081d087b5dedd949de295d1aeeb08ac482f /src
parent7b84a77f3e27880cc4815e2186757cc23ef0bc52 (diff)
parente071d1159277a00e0484dbf43899bc90ea27176c (diff)
downloadandroid_packages_apps_PackageInstaller-0c811b8f46e6816cce9bff2a1b67d5b7037e6397.tar.gz
android_packages_apps_PackageInstaller-0c811b8f46e6816cce9bff2a1b67d5b7037e6397.tar.bz2
android_packages_apps_PackageInstaller-0c811b8f46e6816cce9bff2a1b67d5b7037e6397.zip
Merge "Format the template using HTML tags." into nyc-dev
am: e071d11592 * commit 'e071d1159277a00e0484dbf43899bc90ea27176c': Format the template using HTML tags. Change-Id: I1858bc3c1e6d6fb5f4b37a2ef4a287de635045ae
Diffstat (limited to 'src')
-rw-r--r--src/com/android/packageinstaller/permission/ui/GrantPermissionsActivity.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/com/android/packageinstaller/permission/ui/GrantPermissionsActivity.java b/src/com/android/packageinstaller/permission/ui/GrantPermissionsActivity.java
index 787f1533..4ee76a18 100644
--- a/src/com/android/packageinstaller/permission/ui/GrantPermissionsActivity.java
+++ b/src/com/android/packageinstaller/permission/ui/GrantPermissionsActivity.java
@@ -27,13 +27,12 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PermissionInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.graphics.Typeface;
import android.graphics.drawable.Icon;
import android.hardware.camera2.utils.ArrayUtils;
import android.os.Build;
import android.os.Bundle;
-import android.text.SpannableString;
-import android.text.style.StyleSpan;
+import android.text.Html;
+import android.text.Spanned;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -231,16 +230,10 @@ public class GrantPermissionsActivity extends OverlayTouchActivity
for (GroupState groupState : mRequestGrantPermissionGroups.values()) {
if (groupState.mState == GroupState.STATE_UNKNOWN) {
CharSequence appLabel = mAppPermissions.getAppLabel();
- SpannableString message = new SpannableString(getString(
- R.string.permission_warning_template, appLabel,
- groupState.mGroup.getDescription()));
+ Spanned message = Html.fromHtml(getString(R.string.permission_warning_template,
+ appLabel, groupState.mGroup.getDescription()), 0);
// Set the permission message as the title so it can be announced.
setTitle(message);
- // Color the app name.
- int appLabelStart = message.toString().indexOf(" " + appLabel.toString() + " ", 0);
- int appLabelLength = appLabel.length() + 1;
- message.setSpan(new StyleSpan(Typeface.BOLD), appLabelStart,
- appLabelStart + appLabelLength, 0);
// Set the new grant view
// TODO: Use a real message for the action. We need group action APIs