fix:
update:增加电话管控
This commit is contained in:
2022-11-19 10:38:09 +08:00
parent e61573e132
commit 94e0f9843f

View File

@@ -177,6 +177,7 @@ public class AppListFragment extends BaseFragment {
public void onItemClick(View v, int index) { public void onItemClick(View v, int index) {
DesktopIcon desktopIcon = mDesktopIcons.get(index); DesktopIcon desktopIcon = mDesktopIcons.get(index);
if (desktopIcon != null) { if (desktopIcon != null) {
Log.e(TAG, "onItemClick: " + desktopIcon.getPackageName());
switch (desktopIcon.getPackageName()) { switch (desktopIcon.getPackageName()) {
case "aios.exit": case "aios.exit":
int is_activation = Settings.Global.getInt(mContext.getContentResolver(), "uiui_activation", 0); int is_activation = Settings.Global.getInt(mContext.getContentResolver(), "uiui_activation", 0);
@@ -186,6 +187,18 @@ public class AppListFragment extends BaseFragment {
showPassword(); showPassword();
} }
break; break;
case "com.android.dialer":
int qch_call_forbid = Settings.System.getInt(mContext.getContentResolver(), "qch_call_forbid", 0);
if (qch_call_forbid == 1) {
ToastUtil.show("电话功能被禁用");
return;
} else {
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName());
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
SendRunningApp(getActivity());
}
break;
default: default:
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName()); ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName());
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName()); AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());