version:2.2
fix:修复应用从第一屏开始排列 add:
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
package com.aoleyun.os.uiuiutils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.aoleyun.os.BuildConfig;
|
||||
import com.aoleyun.os.model.LoaderTask;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
|
||||
public class JGYUtils {
|
||||
@@ -17,6 +23,7 @@ public class JGYUtils {
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static JGYUtils sInstance;
|
||||
private Context mContext;
|
||||
private ContentResolver mResolver;
|
||||
public static int MTKPlatform = 1;
|
||||
public static int ZhanruiPlatform = 2;
|
||||
public static int UnknowPlatform = 0;
|
||||
@@ -25,7 +32,11 @@ public class JGYUtils {
|
||||
|
||||
|
||||
private JGYUtils(Context context) {
|
||||
if (context == null) {
|
||||
throw new RuntimeException("Context is NULL");
|
||||
}
|
||||
this.mContext = context;
|
||||
this.mResolver = context.getContentResolver();
|
||||
}
|
||||
|
||||
public static void init(Context context) {
|
||||
@@ -159,5 +170,15 @@ public class JGYUtils {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isEnforceApp(String pkg) {
|
||||
String appString = Settings.System.getString(mResolver, "qch_force_app");
|
||||
if (TextUtils.isEmpty(appString)) return false;
|
||||
Log.e("isEnforceApp", "appString: " + appString);
|
||||
HashSet<String> appSet = new HashSet<>(Arrays.asList(appString.split(",")));
|
||||
appSet.addAll(LoaderTask.showApp);
|
||||
return appSet.contains(pkg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user