mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-04 06:23:04 +00:00
Android O fix
This commit is contained in:
parent
ae9677b82f
commit
b26f40d391
1 changed files with 5 additions and 3 deletions
|
@ -2138,9 +2138,6 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
startForeground(NOTIFY_WAITING, getWaitingNotification());
|
|
||||||
state = State.waiting;
|
|
||||||
|
|
||||||
Log.i(TAG, "Create version=" + Util.getSelfVersionName(this) + "/" + Util.getSelfVersionCode(this));
|
Log.i(TAG, "Create version=" + Util.getSelfVersionName(this) + "/" + Util.getSelfVersionCode(this));
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
@ -2314,6 +2311,11 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
|
if (state == State.enforcing)
|
||||||
|
startForeground(NOTIFY_ENFORCING, getEnforcingNotification(0, 0, 0));
|
||||||
|
else
|
||||||
|
startForeground(NOTIFY_WAITING, getWaitingNotification());
|
||||||
|
|
||||||
Log.i(TAG, "Received " + intent);
|
Log.i(TAG, "Received " + intent);
|
||||||
Util.logExtras(intent);
|
Util.logExtras(intent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue