version:4.5
fix: update:优化爱华解锁
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
|
||||
android:protectionLevel="dangerous" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
|
||||
|
||||
@@ -65,12 +65,14 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
|
||||
//MTK
|
||||
versionCode 13
|
||||
versionName "2.2"
|
||||
// //cube
|
||||
// versionCode 36
|
||||
// versionName "4.5"
|
||||
|
||||
ndk {
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
|
||||
@@ -1289,7 +1289,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
if (appPasswdBeans != null) {
|
||||
for (AppPasswdBean bean : appPasswdBeans) {
|
||||
Log.e(TAG, "removeRecentTask: " + bean.getApp_package());
|
||||
Utils.removeTask(bean.getApp_package());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
Utils.removeTask(bean.getApp_package());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,18 +316,18 @@ public class LoaderTask implements Runnable {
|
||||
final List<UserHandle> profiles = mUserManager.getUserProfiles();
|
||||
String whiteList = Settings.System.getString(crv, JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||
Log.e("verifyApplications", "whiteList: " + whiteList);
|
||||
int aihuaUnlock = Settings.Global.getInt(context.getContentResolver(), "Aihua_unlock_state", 0);
|
||||
Log.e(TAG, "verifyApplications: aihuaUnlock = " + aihuaUnlock);
|
||||
for (UserHandle user : profiles) {
|
||||
final List<LauncherActivityInfo> apps = mLauncherApps.getActivityList(null, user);
|
||||
ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo> added = new ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo>();
|
||||
synchronized (this) {
|
||||
|
||||
for (LauncherActivityInfo app : apps) {
|
||||
Log.e("verifyApplications", "AllAPP: " + app.getApplicationInfo().packageName);
|
||||
if (BuildConfig.APPLICATION_ID.equals(app.getApplicationInfo().packageName))
|
||||
continue;
|
||||
/*系统应用*/
|
||||
int aihuaUnlock = Settings.Global.getInt(context.getContentResolver(), "Aihua_unlock_state", 0);
|
||||
if (JGYUtils.getInstance().getDeviceIsLocked() || aihuaUnlock == 1) {
|
||||
if (JGYUtils.getInstance().getDeviceIsLocked() && aihuaUnlock != 1) {
|
||||
if ((app.getApplicationFlags() & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
if (!showApp.contains(app.getApplicationInfo().packageName)) {
|
||||
Log.e("verifyApplications", "skip1: " + app.getApplicationInfo().packageName);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManagerNative;
|
||||
import android.app.ActivityTaskManager;
|
||||
import android.app.IActivityTaskManager;
|
||||
import android.content.Context;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.Build;
|
||||
@@ -99,9 +100,10 @@ public class Utils {
|
||||
*/
|
||||
public static List<ActivityManager.RecentTaskInfo> getRecentTasks(int numTasks, int userId) {
|
||||
try {
|
||||
return ActivityTaskManager.getService().getRecentTasks(numTasks,
|
||||
IActivityTaskManager iActivityTaskManager = ActivityTaskManager.getService();
|
||||
return iActivityTaskManager.getRecentTasks(numTasks,
|
||||
RECENT_IGNORE_UNAVAILABLE, userId).getList();
|
||||
} catch (RemoteException e) {
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to get recent tasks " + e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user