From 341e4326be57654cb030b6187fe2b0310b1023e6 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 22 Jul 2016 17:03:22 +0200 Subject: [PATCH] Revert "Added public service" This reverts commit d8113645b0cd432e6b0c8661320a6330f13efca8. --- app/app.iml | 34 ++++++------ app/src/main/AndroidManifest.xml | 9 ---- .../eu/faircode/netguard/ServicePublic.java | 54 ------------------- 3 files changed, 17 insertions(+), 80 deletions(-) delete mode 100644 app/src/main/java/eu/faircode/netguard/ServicePublic.java diff --git a/app/app.iml b/app/app.iml index d4357a61..bc39b36e 100644 --- a/app/app.iml +++ b/app/app.iml @@ -42,6 +42,12 @@ + + + + + + @@ -50,12 +56,6 @@ - - - - - - @@ -126,11 +126,11 @@ - - - - - + + + + + @@ -149,12 +149,12 @@ - - + + - - - - + + + + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c1227989..e18b339f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -141,15 +141,6 @@ - - - - - - diff --git a/app/src/main/java/eu/faircode/netguard/ServicePublic.java b/app/src/main/java/eu/faircode/netguard/ServicePublic.java deleted file mode 100644 index a6b59f05..00000000 --- a/app/src/main/java/eu/faircode/netguard/ServicePublic.java +++ /dev/null @@ -1,54 +0,0 @@ -package eu.faircode.netguard; - -/* - This file is part of NetGuard. - - NetGuard is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - NetGuard is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with NetGuard. If not, see . - - Copyright 2015-2016 by Marcel Bokhorst (M66B) -*/ - -import android.app.Service; -import android.content.Intent; -import android.content.SharedPreferences; -import android.os.IBinder; -import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.util.Log; - -public class ServicePublic extends Service { - private static final String TAG = "NetGuard.Public"; - - // am startservice -a eu.faircode.netguard.ENABLE - private static final String ACTION_ENABLE = "eu.faircode.netguard.ENABLE"; - - @Override - @Nullable - public IBinder onBind(Intent intent) { - return null; - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - Log.i(TAG, "Received " + intent); - Util.logExtras(intent); - - if (ACTION_ENABLE.equals(intent.getAction())) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - prefs.edit().putBoolean("enabled", true).apply(); - ServiceSinkhole.start("public", this); - } - return START_NOT_STICKY; - } -}