version:2.0.1.6_release
update:2020.07.14 fix:修复id管控冲突 add:安装完成后10.0添加桌面图标
This commit is contained in:
@@ -52,7 +52,9 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
private void startService(Context context) {
|
||||
context.startService(new Intent(context, InitJpushServer.class));
|
||||
Intent intent=new Intent(context, InitJpushServer.class);
|
||||
// intent.putExtra("boot","BOOT_COMPLETED");
|
||||
context.startService(intent);
|
||||
context.startService(new Intent(context, StepService.class));
|
||||
context.startService(new Intent(context, GuardService.class));
|
||||
context.startService(new Intent(context, MyDownloadService.class));
|
||||
|
||||
@@ -440,7 +440,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
Log.e("SystemSetting", "qch_app_filemanager" + filemanager);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("mjhseng", "SettingSysData---error::" + e.getMessage());
|
||||
Log.e("mjhseng", "SettingSysData---3error::" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -901,9 +901,11 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
if (!result.contains(store)) {
|
||||
result = result + "," + store;
|
||||
}
|
||||
Settings.System.putString(this.mContext.getContentResolver(), "qch_app_forbid", result);
|
||||
String olddeselectViewArray = Settings.System.getString(this.mContext.getContentResolver(), "qch_app_forbid_id");
|
||||
Log.e("SystemSetting", "olddeselectViewArray---------" + olddeselectViewArray);
|
||||
Settings.System.putString(this.mContext.getContentResolver(), "qch_app_forbid_id", result);
|
||||
Settings.System.putString(this.mContext.getContentResolver(), "DeselectViewArray", s1);
|
||||
Log.e("qch_app_forbid", "qch_app_forbid---------" + result);
|
||||
Log.e("qch_app_forbid_id", "qch_app_forbid_id---------" + result);
|
||||
Log.e("SystemSetting", "deselectViewArray---------" + s1);
|
||||
return;
|
||||
} else {
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
@@ -43,17 +44,26 @@ public class NewAppReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
action = intent.getAction();
|
||||
Log.e("onReceive", action);
|
||||
//接收安装广播
|
||||
if (action.equals(Intent.ACTION_PACKAGE_ADDED) || action.equals(Intent.ACTION_PACKAGE_REPLACED)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Intent intent1 = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||
intent1.setComponent(new ComponentName("com.jiaoguanyi.store", "com.mjsheng.myappstore.receiver.BootReceiver"));
|
||||
context.sendBroadcast(intent1);
|
||||
}
|
||||
|
||||
Intent allIntent = new Intent();
|
||||
allIntent.setAction(Utils.DOWNLOAD_ALLTASK_ACTION);
|
||||
context.sendBroadcast(allIntent);
|
||||
String packageName = intent.getDataString().replace("package:", "");
|
||||
String result = Settings.System.getString(context.getContentResolver(), "qch_app_forbid");
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (!packageName.equals("com.jiaoguanyi.store") || !packageName.equals("com.jiaoguanyi.appstore")) {
|
||||
// ApkUtils.getStartActivityName(context, packageName);
|
||||
ApkUtils.addShortcut(context, result);
|
||||
}
|
||||
Intent intent1 = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||
intent1.setComponent(new ComponentName("com.jiaoguanyi.store", "com.mjsheng.myappstore.receiver.BootReceiver"));
|
||||
context.sendBroadcast(intent1);
|
||||
}
|
||||
|
||||
// MyApplication.getInstance().removeDate(packageName);
|
||||
Log.e(TAG, "安装了:" + packageName + "包名的程序");
|
||||
Log.e("fht", "安装了:" + packageName + "包名的程序");
|
||||
@@ -96,6 +106,17 @@ public class NewAppReceiver extends BroadcastReceiver {
|
||||
if (!packageName.equals(Utils.YOUNGSYSTEM_APP_TONGBU) && !packageName.equals(context.getPackageName())) {
|
||||
deletedateUserApp(context, packageName);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
String result = Settings.System.getString(context.getContentResolver(), "qch_app_forbid");
|
||||
if (!packageName.equals("com.jiaoguanyi.store") || !packageName.equals("com.jiaoguanyi.appstore")) {
|
||||
// ApkUtils.getStartActivityName(context, packageName);
|
||||
ApkUtils.addShortcut(context, result);
|
||||
}
|
||||
Intent intent1 = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||
intent1.setComponent(new ComponentName("com.jiaoguanyi.store", "com.mjsheng.myappstore.receiver.BootReceiver"));
|
||||
context.sendBroadcast(intent1);
|
||||
}
|
||||
Intent intent1 = new Intent();
|
||||
intent1.setAction(Utils.ACTION_PACKAGE_REMOVED);
|
||||
intent1.putExtra("packageName", packageName);
|
||||
|
||||
Reference in New Issue
Block a user