Fixed theming

This commit is contained in:
M66B 2016-02-01 07:37:13 +01:00
parent 585c6383c8
commit af4c9e170a
1 changed files with 3 additions and 5 deletions

View File

@ -1496,7 +1496,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
PendingIntent pi = PendingIntent.getActivity(this, 0, main, PendingIntent.FLAG_UPDATE_CURRENT);
TypedValue tv = new TypedValue();
getTheme().resolveAttribute(R.attr.colorAccent, tv, true);
getTheme().resolveAttribute(R.attr.colorOff, tv, true);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_error_white_24dp)
.setContentTitle(getString(R.string.app_name))
@ -1522,7 +1522,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
PendingIntent pi = PendingIntent.getActivity(this, 0, main, PendingIntent.FLAG_UPDATE_CURRENT);
TypedValue tv = new TypedValue();
getTheme().resolveAttribute(R.attr.colorAccent, tv, true);
getTheme().resolveAttribute(R.attr.colorOff, tv, true);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_error_white_24dp)
.setContentTitle(getString(R.string.app_name))
@ -1552,8 +1552,6 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
PendingIntent pi = PendingIntent.getActivity(SinkholeService.this, uid + 10000, main, PendingIntent.FLAG_UPDATE_CURRENT);
TypedValue tv = new TypedValue();
getTheme().resolveAttribute(R.attr.colorAccent, tv, true);
int colorAccent = tv.data;
getTheme().resolveAttribute(R.attr.colorOn, tv, true);
int colorOn = tv.data;
getTheme().resolveAttribute(R.attr.colorOff, tv, true);
@ -1564,7 +1562,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
.setContentTitle(getString(R.string.app_name))
.setContentText(getString(R.string.msg_access, name))
.setContentIntent(pi)
.setColor(colorAccent)
.setColor(colorOff)
.setOngoing(false)
.setAutoCancel(true);