update:2020.06.03
fix: add:增加禁止滑动和隐藏桌面图标功能
This commit is contained in:
@@ -15,10 +15,10 @@ android {
|
||||
minSdkVersion 20
|
||||
targetSdkVersion 29
|
||||
|
||||
versionCode 138
|
||||
versionName "2.9.5"//测试jiaoguanyi.cn
|
||||
// versionCode 127
|
||||
// versionName "2.0.0.7"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
versionCode 140
|
||||
versionName "2.9.7"//测试jiaoguanyi.cn
|
||||
// versionCode 128
|
||||
// versionName "2.0.0.8"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
multiDexEnabled true
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.MASTER_CLEAR" />
|
||||
<uses-permission android:name="android.permission.REBOOT"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
@@ -520,6 +520,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
HTTPInterface.setBrowserList(MainActivity.this);//浏览器网址管控
|
||||
HTTPInterface.setHomepagtag(MainActivity.this);//设置主页和标签
|
||||
HTTPInterface.setAppinsideWeb(MainActivity.this);//app内部网页管控
|
||||
HTTPInterface.setHideDesktopIcon(MainActivity.this);//设置桌面图标隐藏
|
||||
getDeselectID();//ID管控
|
||||
getAppLimitApi();//写入可被安装的包名
|
||||
getAppInfo();//上传APP信息
|
||||
@@ -621,7 +622,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
allIntent.setAction(Utils.DOWNLOAD_ALLTASK_ACTION);
|
||||
sendBroadcast(allIntent);
|
||||
loadHeadImg(Configure.HTTP_TAG_HOME_PAGE_URL);
|
||||
lazyLoading();
|
||||
getLockedState();
|
||||
MyApplication.getInstance().getWhitePackageList();
|
||||
|
||||
}
|
||||
@@ -1220,12 +1221,23 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
String net_ok = "";
|
||||
String net_not = "";
|
||||
String launch = "";
|
||||
String camera_ok = "";
|
||||
String camera_not = "";
|
||||
String upgrade_ok = "";
|
||||
String upgrade_not = "";
|
||||
String slide_ok = "";
|
||||
String slide_not = "";
|
||||
|
||||
List<NetAndLaunchData> data = netAndLaunchBean.getData();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
NetAndLaunchData netAndLaunchData = data.get(i);
|
||||
String app_package = netAndLaunchData.getApp_package();
|
||||
int is_auto = netAndLaunchData.getIs_auto();
|
||||
int is_network = netAndLaunchData.getIs_network();
|
||||
int is_camera = netAndLaunchData.getIs_camera();
|
||||
int is_upgrade = netAndLaunchData.getIs_upgrade();
|
||||
int is_slide = netAndLaunchData.getIs_slide();
|
||||
|
||||
|
||||
if (is_auto == 1) {
|
||||
launch += app_package + ",";
|
||||
@@ -1236,6 +1248,21 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
net_not += app_package + ",";
|
||||
}
|
||||
|
||||
if (is_camera == 1) {
|
||||
camera_ok += app_package + ",";
|
||||
} else {
|
||||
camera_not += app_package + ",";
|
||||
}
|
||||
if (is_upgrade == 1) {
|
||||
upgrade_ok += app_package + ",";
|
||||
} else {
|
||||
upgrade_not += app_package + ",";
|
||||
}
|
||||
if (is_slide == 1) {
|
||||
slide_ok += app_package + ",";
|
||||
} else {
|
||||
slide_not += app_package + ",";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1248,24 +1275,65 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
if (!TextUtils.isEmpty(net_not)) {
|
||||
net_not = net_not.substring(0, net_not.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(camera_ok)) {
|
||||
camera_ok = camera_ok.substring(0, camera_ok.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(camera_not)) {
|
||||
camera_not = camera_not.substring(0, camera_not.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(upgrade_ok)) {
|
||||
upgrade_ok = upgrade_ok.substring(0, upgrade_ok.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(upgrade_not)) {
|
||||
upgrade_not = upgrade_not.substring(0, upgrade_not.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(slide_ok)) {
|
||||
slide_ok = slide_ok.substring(0, slide_ok.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(slide_not)) {
|
||||
slide_not = slide_not.substring(0, slide_not.length() - 1);
|
||||
boolean writeSucceed = Settings.System.putString(this.getContentResolver(), "qch_disable_slide", slide_not);
|
||||
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
} else {
|
||||
boolean writeSucceed = Settings.System.putString(this.getContentResolver(), "qch_disable_slide", "Invalid");
|
||||
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
}
|
||||
|
||||
Utils.writeDisableUpdateList(this, upgrade_not.split(","), upgrade_ok.split(","));
|
||||
|
||||
LogUtils.e("launch:" + launch + "-----------net_ok:" + net_ok + "-----------net_not:" + net_not);
|
||||
boolean qch_app_power_on = Settings.System.putString(getContentResolver(), "qch_app_power_on", launch);
|
||||
boolean qch_app_power_on = Settings.System.putString(getApplicationContext().getContentResolver(), "qch_app_power_on", launch);
|
||||
|
||||
// Intent netControlIntent = new Intent(CommonDatas.ACTION_HrReceiver_JGY_DIS);
|
||||
// netControlIntent.putExtra("package_name", net_not);
|
||||
// sendBroadcast(netControlIntent);
|
||||
//
|
||||
// Intent netControlNotIntent = new Intent(CommonDatas.ACTION_HrReceiver_JGY);
|
||||
// netControlNotIntent.putExtra("package_name", net_ok);
|
||||
// sendBroadcast(netControlNotIntent);
|
||||
if (!net_not.equals("")) {
|
||||
String[] bans = net_not.split(",");
|
||||
Settings.System.putString(getContentResolver(), "qch_jgy_network_disallow", net_not);
|
||||
Log.e("fht", "ban::" + net_not);
|
||||
|
||||
}
|
||||
|
||||
MyApplication.getInstance().setFinished(true);
|
||||
if (!net_ok.equals("")) {
|
||||
String[] nots = net_ok.split(",");
|
||||
Log.e("fht", "not::" + net_ok);
|
||||
// new BroadcastThread("qch_jgy_network_allow",nots).start();
|
||||
}
|
||||
|
||||
|
||||
Intent intent2 = new Intent("qch_camera_forbid");
|
||||
intent2.putExtra("camera_package_name", camera_not).setPackage("com.android.settings");
|
||||
sendBroadcast(intent2);
|
||||
Intent intent1 = new Intent("qch_camera_open");
|
||||
intent1.putExtra("camera_package_name", camera_ok).setPackage("com.android.settings");
|
||||
sendBroadcast(intent1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void writeDeselectBrowserIDtoSystem(String ids) {
|
||||
if (!TextUtils.isEmpty(ids)) {
|
||||
boolean deselectBrowserArray = Settings.System.putString(getContentResolver(), "DeselectBrowserArray", ids);
|
||||
|
||||
@@ -16,6 +16,26 @@ public class NetAndLaunchData {
|
||||
private int is_network;
|
||||
private int is_camera;
|
||||
|
||||
public int getIs_slide() {
|
||||
return is_slide;
|
||||
}
|
||||
|
||||
public void setIs_slide(int is_slide) {
|
||||
this.is_slide = is_slide;
|
||||
}
|
||||
|
||||
private int is_slide;
|
||||
|
||||
|
||||
public int getIs_upgrade() {
|
||||
return is_upgrade;
|
||||
}
|
||||
|
||||
public void setIs_upgrade(int is_upgrade) {
|
||||
this.is_upgrade = is_upgrade;
|
||||
}
|
||||
|
||||
private int is_upgrade;
|
||||
|
||||
public String getApp_package() {
|
||||
return app_package;
|
||||
|
||||
@@ -358,10 +358,11 @@ public class HTTPInterface {
|
||||
JSONObject jsondata = JSON.parseObject(data);
|
||||
//主页
|
||||
String homepagURL = jsondata.getString("homepage");
|
||||
Intent homepag = new Intent("qch_app_brower_homepage")
|
||||
.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser")
|
||||
;
|
||||
Intent homepag = new Intent("qch_app_brower_homepage");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
homepag.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
if (homepagURL != null && !homepagURL.equals("")) {
|
||||
homepag.putExtra("homepage", homepagURL);
|
||||
} else {
|
||||
@@ -371,10 +372,11 @@ public class HTTPInterface {
|
||||
|
||||
//书签
|
||||
String labelpage = jsondata.getString("labelpage");
|
||||
Intent websiteBookMark = new Intent("qch_app_brower_website")
|
||||
.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser")
|
||||
;
|
||||
Intent websiteBookMark = new Intent("qch_app_brower_website");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
websiteBookMark.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
if (labelpage != null && !labelpage.equals("")) {
|
||||
websiteBookMark.putExtra("websiteBookMark", labelpage);
|
||||
} else {
|
||||
@@ -383,16 +385,18 @@ public class HTTPInterface {
|
||||
context.sendBroadcast(websiteBookMark);
|
||||
|
||||
} else {
|
||||
Intent intent1 = new Intent("qch_app_brower_homepage")
|
||||
.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser")
|
||||
;
|
||||
Intent intent1 = new Intent("qch_app_brower_homepage");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent1.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
intent1.putExtra("homepage", "Invalid");
|
||||
context.sendBroadcast(intent1);
|
||||
Intent intent2 = new Intent("qch_app_brower_website")
|
||||
.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser")
|
||||
;
|
||||
Intent intent2 = new Intent("qch_app_brower_website");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent2.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
intent2.putExtra("websiteBookMark", "Invalid");
|
||||
context.sendBroadcast(intent2);
|
||||
}
|
||||
@@ -540,4 +544,45 @@ public class HTTPInterface {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public static void setHideDesktopIcon(final Context context) {
|
||||
OkGo.post(Configure.GET_HIDE_DESKTOPICON)
|
||||
.params("key", Configure.HTTP_KEY)
|
||||
.params("sn", Utils.getSerial())
|
||||
.execute(new StringCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s, Call call, Response response) {
|
||||
try {
|
||||
JSONObject jsonObject = JSON.parseObject(s);
|
||||
int code = jsonObject.getInteger("code");
|
||||
String msg = jsonObject.getString("msg");
|
||||
String data = jsonObject.getString("data");
|
||||
// 不判断code,根据写入数据库的值比较
|
||||
boolean write = false;
|
||||
if (data != null && !"".equals(data)) {
|
||||
String olddata = Settings.System.getString(context.getContentResolver(), "hide_desktop_icon");
|
||||
if (!olddata.equalsIgnoreCase(data)) {
|
||||
write = Settings.System.putString(context.getContentResolver(), "hide_desktop_icon", data);
|
||||
} else {
|
||||
Log.e("SystemSetting", "setHideDesktopIcon-equally");
|
||||
}
|
||||
Log.e("SystemSetting", "setHideDesktopIcon---------" + write + ":" + data);
|
||||
}
|
||||
if (write) {
|
||||
Utils.rebootDevices(context);
|
||||
Log.e("fht", "reboot");
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
Log.e("fht", "setHideDesktopIcon" + e.getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Call call, Response response, Exception e) {
|
||||
super.onError(call, response, e);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,10 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
|
||||
private final String DISABLE_APPUPDATE = "17";//禁止app升级
|
||||
|
||||
private final String HIDE_DESKTOP_ICON = "18";//隐藏桌面图标
|
||||
|
||||
private final String DISABLE_APP_SLIDE = "19";//隐藏桌面图标
|
||||
|
||||
|
||||
private Context mContext;
|
||||
|
||||
@@ -314,7 +318,8 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
if (!SaveListUtils.isDownLoading(app_url)) {
|
||||
Aria.download(this)
|
||||
.load(app_url)
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(s) + ".apk").setExtendField(app_package)
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(s) + ".apk")
|
||||
.setExtendField(app_package)
|
||||
.create();
|
||||
}
|
||||
} else {
|
||||
@@ -328,7 +333,8 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
if (!SaveListUtils.isDownLoading(app_url)) {
|
||||
Aria.download(this)
|
||||
.load(app_url)
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(s) + ".apk").setExtendField(app_package)
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(s) + ".apk")
|
||||
.setExtendField(app_package)
|
||||
.create();
|
||||
}
|
||||
}
|
||||
@@ -375,8 +381,9 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
private int getBatteryLevel() {
|
||||
if (Build.VERSION.SDK_INT >= 21)
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
return ((BatteryManager) this.mContext.getSystemService(Context.BATTERY_SERVICE)).getIntProperty(4);
|
||||
}
|
||||
Intent intent = (new ContextWrapper(this.mContext)).registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
||||
return intent.getIntExtra("level", -1) * 100 / intent.getIntExtra("scale", -1);
|
||||
}
|
||||
@@ -590,6 +597,33 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
Log.e("fht", extras);
|
||||
setDisableUpdateList(extras);
|
||||
break;
|
||||
case HIDE_DESKTOP_ICON:
|
||||
HTTPInterface.setHideDesktopIcon(context);
|
||||
break;
|
||||
case DISABLE_APP_SLIDE:
|
||||
setDisableSlideList(extras);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setDisableSlideList(String s) {
|
||||
try {
|
||||
JSONObject jSONObject = new JSONObject(s);
|
||||
Log.e("mymjsheng", "jSONObject::" + jSONObject.toString());
|
||||
String strban = jSONObject.optString("ban");
|
||||
String strnot = jSONObject.optString("not");
|
||||
String qch_disable_slide = Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_disable_slide");
|
||||
Log.e("fht", "qch_disable_slide::" + qch_disable_slide);
|
||||
|
||||
if (!strban.equals("")) {
|
||||
Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", strban);
|
||||
Log.e("fht", "sendban::" + strban);
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", "invalid");
|
||||
}
|
||||
Log.e("fht", "qch_disable_slide::" + Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_disable_slide"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -486,6 +486,10 @@ public class InitJpushServer extends Service {
|
||||
String launch = "";
|
||||
String camera_ok = "";
|
||||
String camera_not = "";
|
||||
String upgrade_ok = "";
|
||||
String upgrade_not = "";
|
||||
String slide_ok = "";
|
||||
String slide_not = "";
|
||||
|
||||
List<NetAndLaunchData> data = netAndLaunchBean.getData();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
@@ -494,6 +498,9 @@ public class InitJpushServer extends Service {
|
||||
int is_auto = netAndLaunchData.getIs_auto();
|
||||
int is_network = netAndLaunchData.getIs_network();
|
||||
int is_camera = netAndLaunchData.getIs_camera();
|
||||
int is_upgrade = netAndLaunchData.getIs_upgrade();
|
||||
int is_slide = netAndLaunchData.getIs_slide();
|
||||
|
||||
|
||||
if (is_auto == 1) {
|
||||
launch += app_package + ",";
|
||||
@@ -509,7 +516,16 @@ public class InitJpushServer extends Service {
|
||||
} else {
|
||||
camera_not += app_package + ",";
|
||||
}
|
||||
|
||||
if (is_upgrade == 1) {
|
||||
upgrade_ok += app_package + ",";
|
||||
} else {
|
||||
upgrade_not += app_package + ",";
|
||||
}
|
||||
if (is_slide == 1) {
|
||||
slide_ok += app_package + ",";
|
||||
} else {
|
||||
slide_not += app_package + ",";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -528,6 +544,25 @@ public class InitJpushServer extends Service {
|
||||
if (!TextUtils.isEmpty(camera_not)) {
|
||||
camera_not = camera_not.substring(0, camera_not.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(upgrade_ok)) {
|
||||
upgrade_ok = upgrade_ok.substring(0, upgrade_ok.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(upgrade_not)) {
|
||||
upgrade_not = upgrade_not.substring(0, upgrade_not.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(slide_ok)) {
|
||||
slide_ok = slide_ok.substring(0, slide_ok.length() - 1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(slide_not)) {
|
||||
slide_not = slide_not.substring(0, slide_not.length() - 1);
|
||||
boolean writeSucceed = Settings.System.putString(this.getContentResolver(), "qch_disable_slide", slide_not);
|
||||
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
} else {
|
||||
boolean writeSucceed = Settings.System.putString(this.getContentResolver(), "qch_disable_slide", "Invalid");
|
||||
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
}
|
||||
|
||||
Utils.writeDisableUpdateList(this, upgrade_not.split(","), upgrade_ok.split(","));
|
||||
|
||||
LogUtils.e("launch:" + launch + "-----------net_ok:" + net_ok + "-----------net_not:" + net_not);
|
||||
boolean qch_app_power_on = Settings.System.putString(getApplicationContext().getContentResolver(), "qch_app_power_on", launch);
|
||||
@@ -708,6 +743,7 @@ public class InitJpushServer extends Service {
|
||||
HTTPInterface.setBrowserList(InitJpushServer.this);//浏览器网址管控
|
||||
HTTPInterface.setAppinsideWeb(InitJpushServer.this);//app内部网页管控
|
||||
HTTPInterface.setHomepagtag(InitJpushServer.this);//设置主页和标签
|
||||
HTTPInterface.setHideDesktopIcon(InitJpushServer.this);//设置桌面图标隐藏
|
||||
MyApplication.getInstance().getWhitePackageList();
|
||||
|
||||
}
|
||||
|
||||
@@ -191,12 +191,15 @@ public class Configure {
|
||||
public static final String GET_DEVICES_TAGS = HTTP_TAG_HEAD_NEW + "Sn/getSnTag";
|
||||
//获取设备标签
|
||||
public static final String DELETE_GEDEVICE_ALIAS = HTTP_TAG_HEAD_NEW + "Sn/deleteAliases";
|
||||
//浏览器书签主页设置
|
||||
//删除Aliases
|
||||
public static final String SET_HOMEPAG_TAG = HTTP_TAG_HEAD_NEW + "Label";
|
||||
//app内部网页管控
|
||||
//浏览器书签主页设置
|
||||
public static final String SET_APPINSIDEWEB = HTTP_TAG_HEAD_NEW + "Appground";
|
||||
//浏览器黑白名单地址
|
||||
//app内部网页管控
|
||||
public static final String SET_BROWSER_LIST = HTTP_TAG_HEAD_NEW + "browser";
|
||||
|
||||
//浏览器黑白名单地址
|
||||
public static final String SEND_APP_USAGE = HTTP_TAG_HEAD_NEW + "firmware/index";
|
||||
//应用白名单
|
||||
public static final String GET_HIDE_DESKTOPICON = HTTP_TAG_HEAD_NEW + "Icon";
|
||||
//获取隐藏桌面图标
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import android.net.wifi.WifiInfo;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
@@ -955,4 +956,10 @@ public class Utils {
|
||||
*/
|
||||
}
|
||||
|
||||
public static void rebootDevices(Context context) {
|
||||
Intent iReboot = new Intent(Intent.ACTION_REBOOT);
|
||||
iReboot.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(iReboot);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user