Android Nougat compatibility

This commit is contained in:
M66B 2017-04-02 15:13:44 +02:00
parent eed9245f16
commit 653f7a0326
2 changed files with 6 additions and 2 deletions

View File

@ -2019,7 +2019,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
PendingIntent piWifi = PendingIntent.getService(this, uid, riWifi, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action wAction = new NotificationCompat.Action.Builder(
wifi ? R.drawable.wifi_on : R.drawable.wifi_off,
getString(wifi ? R.string.title_allow : R.string.title_block),
getString(wifi ? R.string.title_allow_wifi : R.string.title_block_wifi),
piWifi
).build();
builder.addAction(wAction);
@ -2034,7 +2034,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
PendingIntent piOther = PendingIntent.getService(this, uid + 10000, riOther, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action oAction = new NotificationCompat.Action.Builder(
other ? R.drawable.other_on : R.drawable.other_off,
getString(other ? R.string.title_allow : R.string.title_block),
getString(other ? R.string.title_allow_other : R.string.title_block_other),
piOther
).build();
builder.addAction(oAction);

View File

@ -253,6 +253,10 @@ Your internet traffic is not being sent to a remote VPN server.</string>
<string name="title_rate">Rate</string>
<string name="title_allow">Allow</string>
<string name="title_block">Block</string>
<string name="title_allow_wifi">Allow Wi-Fi</string>
<string name="title_block_wifi">Block Wi-Fi</string>
<string name="title_allow_other">Allow mobile</string>
<string name="title_block_other">Block mobile</string>
<string name="title_root">root</string>
<string name="title_mediaserver">mediaserver</string>
<string name="title_nobody">nobody</string>