mirror of https://github.com/M66B/NetGuard.git
parent
79779dceae
commit
c056d7db93
|
@ -59,5 +59,17 @@
|
|||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget" />
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name=".DeviceAdministratorReceiver"
|
||||
android:permission="android.permission.BIND_DEVICE_ADMIN">
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/admin" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
<action android:name="android.app.action.ACTION_DEVICE_ADMIN_DISABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2015 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.app.admin.DeviceAdminReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
public class DeviceAdministratorReceiver extends DeviceAdminReceiver {
|
||||
private static final String TAG = "NetGuard.Admin";
|
||||
|
||||
@Override
|
||||
public void onEnabled(Context context, Intent intent) {
|
||||
super.onEnabled(context, intent);
|
||||
Log.i(TAG, "Device admin enabled");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisabled(Context context, Intent intent) {
|
||||
super.onDisabled(context, intent);
|
||||
Log.i(TAG, "Device admin disabled");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<device-admin xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<uses-policies />
|
||||
</device-admin>
|
Loading…
Reference in New Issue