mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-01 12:54:07 +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
|
||||
public void onCreate() {
|
||||
startForeground(NOTIFY_WAITING, getWaitingNotification());
|
||||
state = State.waiting;
|
||||
|
||||
Log.i(TAG, "Create version=" + Util.getSelfVersionName(this) + "/" + Util.getSelfVersionCode(this));
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
@ -2314,6 +2311,11 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
|
||||
@Override
|
||||
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);
|
||||
Util.logExtras(intent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue