Loading packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +10 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.os.UserManager; import android.text.Html; import android.text.Html.ImageGetter; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.Button; import android.widget.TextView; Loading Loading @@ -111,8 +112,16 @@ public class ConfirmDialog extends AlertActivity @Override public Drawable getDrawable(String source) { // Should only reach this when fetching the VPN icon for the warning string. Drawable icon = getDrawable(R.drawable.ic_vpn_dialog); final Drawable icon = getDrawable(R.drawable.ic_vpn_dialog); icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); final TypedValue tv = new TypedValue(); if (getTheme().resolveAttribute(android.R.attr.textColorPrimary, tv, true)) { icon.setTint(getColor(tv.resourceId)); } else { Log.w(TAG, "Unable to resolve theme color"); } return icon; } Loading Loading
packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +10 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.os.UserManager; import android.text.Html; import android.text.Html.ImageGetter; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.Button; import android.widget.TextView; Loading Loading @@ -111,8 +112,16 @@ public class ConfirmDialog extends AlertActivity @Override public Drawable getDrawable(String source) { // Should only reach this when fetching the VPN icon for the warning string. Drawable icon = getDrawable(R.drawable.ic_vpn_dialog); final Drawable icon = getDrawable(R.drawable.ic_vpn_dialog); icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); final TypedValue tv = new TypedValue(); if (getTheme().resolveAttribute(android.R.attr.textColorPrimary, tv, true)) { icon.setTint(getColor(tv.resourceId)); } else { Log.w(TAG, "Unable to resolve theme color"); } return icon; } Loading