update:2020.10.21
fix:蓝牙文件传输管控改为蓝牙开关管控 add:摄像头管控,影音格式管控,电话功能管控
This commit is contained in:
43
app/src/main/java/com/info/sn/service/InitJpushServer.java
Normal file
43
app/src/main/java/com/info/sn/service/InitJpushServer.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.info.sn.service;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
|
||||
import com.info.sn.network.api.HTTPInterface;
|
||||
|
||||
public class InitJpushServer extends Service {
|
||||
public InitJpushServer() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
// TODO: Return the communication channel to the service.
|
||||
// throw new UnsupportedOperationException("Not yet implemented");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
HTTPInterface.checkDevicesInfo(InitJpushServer.this);
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
|
||||
private Handler mHandler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
super.handleMessage(msg);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -51,12 +51,12 @@ public class MyDownloadService extends Service implements NetworkUtils.OnNetwork
|
||||
//静默升级桌面
|
||||
CheckUpdateByPackageName("com.uiuios.updatetools", handler);
|
||||
//静默升级更新工具
|
||||
HTTPInterface.getAllAppPackageName(handler);
|
||||
// HTTPInterface.getAllAppPackageName(handler);
|
||||
Aria.download(this).register();
|
||||
|
||||
Aria.download(this).resumeAllTask();
|
||||
//恢复所有未完成的下载任务
|
||||
return super.onStartCommand(intent, flags, startId);
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
|
||||
@@ -126,11 +126,9 @@ public class MyDownloadService extends Service implements NetworkUtils.OnNetwork
|
||||
break;
|
||||
case 201:
|
||||
String apppackage = (String) msg.obj;
|
||||
Log.e("fht", Settings.System.getString(getContentResolver(), "qch_app_forbid") + "?");
|
||||
Log.e("handler", Settings.System.getString(getContentResolver(), "qch_app_forbid") + "?");
|
||||
try {
|
||||
if (Settings.System.putString(getContentResolver(), "qch_app_forbid", apppackage)) {
|
||||
Log.e("fht", "app package write successful");
|
||||
}
|
||||
Settings.System.putString(getContentResolver(), "qch_app_forbid", apppackage+ "com.info.sn,com.android.uiuios,com.appstore.uiui,com.uiuios.updatetools");
|
||||
} catch (Exception e) {
|
||||
Log.e("fht", e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user