From 9ae037c73c1f9f9d5c1ea4912f62a392442e1342 Mon Sep 17 00:00:00 2001 From: ukanth Date: Sat, 19 Aug 2023 14:02:39 +0530 Subject: [PATCH] Removed unused class --- .../dev/ukanth/iconmgr/util/AppFreeze.java | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 app/src/main/java/dev/ukanth/iconmgr/util/AppFreeze.java diff --git a/app/src/main/java/dev/ukanth/iconmgr/util/AppFreeze.java b/app/src/main/java/dev/ukanth/iconmgr/util/AppFreeze.java deleted file mode 100644 index 067900f..0000000 --- a/app/src/main/java/dev/ukanth/iconmgr/util/AppFreeze.java +++ /dev/null @@ -1,31 +0,0 @@ -package dev.ukanth.iconmgr.util; - -import android.util.Log; - -import com.topjohnwu.superuser.Shell; - -public class AppFreeze { - private static final String FREEZE_COMMAND = "pm disable %s"; - private static final String UNFREEZE_COMMAND = "pm enable %s"; - - public static boolean freezeApp(String packageName) { - String command = String.format(FREEZE_COMMAND, packageName); - return executeCommand(command); - } - - public static boolean unfreezeApp(String packageName) { - String command = String.format(UNFREEZE_COMMAND, packageName); - return executeCommand(command); - } - - private static boolean executeCommand(String command) { - try { - Shell.Result result; - result = Shell.cmd(command).exec(); - return result.isSuccess(); - } catch (Exception e) { - Log.e("micopacks", e.getMessage()); - } - return false; - } -}