update:2021.01.27
fix:修复应用安装信息上传 add:时间管控,顶部app管控
This commit is contained in:
@@ -87,7 +87,7 @@ public class ApkUtils {
|
||||
public static void openApp(Context context, String packageName) {
|
||||
Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);
|
||||
if (intent != null) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
@@ -631,12 +631,12 @@ public class ApkUtils {
|
||||
} catch (Settings.SettingNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
PackageManager pm = context.getPackageManager();
|
||||
if (hide == 0) {
|
||||
pm.setApplicationEnabledSetting(pkage, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
|
||||
} else {
|
||||
pm.setApplicationEnabledSetting(pkage, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||
}
|
||||
// PackageManager pm = context.getPackageManager();
|
||||
// if (hide == 0) {
|
||||
// pm.setApplicationEnabledSetting(pkage, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
|
||||
// } else {
|
||||
// pm.setApplicationEnabledSetting(pkage, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -676,8 +676,10 @@ public class ApkUtils {
|
||||
continue;
|
||||
}
|
||||
// ApkUtils.getStartActivityName(context, s);
|
||||
installedList += s + ",";
|
||||
Log.e("addShortcut", s);
|
||||
if (!installedList.contains(s)) {
|
||||
installedList += s + ",";
|
||||
Log.e("addShortcut", s);
|
||||
}
|
||||
}
|
||||
if (installedList.length() != 0) {
|
||||
installedList = installedList.substring(0, installedList.length() - 1);
|
||||
@@ -697,6 +699,7 @@ public class ApkUtils {
|
||||
String store = "com.jiaoguanyi.store";
|
||||
String infosn = "com.info.sn";
|
||||
String appstoreuiui = "com.appstore.uiui";
|
||||
String desktop = "com.android.uiuios";
|
||||
String jgy1 = "com.uiuios.jgy1";
|
||||
String jgy2 = "com.uiuios.jgy2";
|
||||
if (!TextUtils.isEmpty(result)) {
|
||||
@@ -718,6 +721,9 @@ public class ApkUtils {
|
||||
if (!result.contains(appstoreuiui)) {
|
||||
result = result + "," + appstoreuiui;
|
||||
}
|
||||
if (!result.contains(desktop)) {
|
||||
result = result + "," + desktop;
|
||||
}
|
||||
boolean qch_app_forbid = Settings.System.putString(context.getContentResolver(), "qch_app_forbid", result);
|
||||
Log.e("fht", "qch_app_forbid :" + result + ":" + qch_app_forbid);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user