version:1.6
fix: update:修改mtk主页显示,增加mtk高德地图key
This commit is contained in:
@@ -15,8 +15,8 @@ android {
|
|||||||
applicationId "com.uiui.os"
|
applicationId "com.uiui.os"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 6
|
versionCode 7
|
||||||
versionName "1.5"
|
versionName "1.6"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ android {
|
|||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
AMAP_KEY: "70f37634f84b00c5c7347c545bc2a3b9"
|
AMAP_KEY: "e7c2b3cb84ca7ac4100b1ffceb3d5685"
|
||||||
]
|
]
|
||||||
// 显示Log
|
// 显示Log
|
||||||
buildConfigField "boolean", "LOG_DEBUG", "true"
|
buildConfigField "boolean", "LOG_DEBUG", "true"
|
||||||
@@ -103,7 +103,7 @@ android {
|
|||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
AMAP_KEY: "70f37634f84b00c5c7347c545bc2a3b9"
|
AMAP_KEY: "e7c2b3cb84ca7ac4100b1ffceb3d5685"
|
||||||
]
|
]
|
||||||
// 不显示Log
|
// 不显示Log
|
||||||
buildConfigField "boolean", "LOG_DEBUG", "false"
|
buildConfigField "boolean", "LOG_DEBUG", "false"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.uiui.os.utils;
|
package com.uiui.os.utils;
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -15,7 +14,6 @@ import com.uiui.os.BuildConfig;
|
|||||||
|
|
||||||
import java.text.Collator;
|
import java.text.Collator;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -29,7 +27,8 @@ public class APKUtils {
|
|||||||
this.add("com.sprd.sprdnote");
|
this.add("com.sprd.sprdnote");
|
||||||
this.add("com.android.deskclock");
|
this.add("com.android.deskclock");
|
||||||
this.add("com.alldocube.store");
|
this.add("com.alldocube.store");
|
||||||
this.add("com.android.uiuios");
|
this.add("com.android.email");
|
||||||
|
this.add("com.android.calendar");
|
||||||
}};
|
}};
|
||||||
private static HashSet<String> showPackageName = new HashSet<String>() {{
|
private static HashSet<String> showPackageName = new HashSet<String>() {{
|
||||||
this.add("com.android.dialer");
|
this.add("com.android.dialer");
|
||||||
@@ -37,8 +36,12 @@ public class APKUtils {
|
|||||||
this.add("com.android.settings");
|
this.add("com.android.settings");
|
||||||
this.add("com.android.messaging");
|
this.add("com.android.messaging");
|
||||||
this.add("com.android.camera2");
|
this.add("com.android.camera2");
|
||||||
|
this.add("com.mediatek.camera");
|
||||||
|
this.add("com.android.mms");
|
||||||
|
}};
|
||||||
|
private static HashSet<String> allHintPackage = new HashSet<String>() {{
|
||||||
|
this.add("com.android.uiuios");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
private static String TAG = APKUtils.class.getSimpleName();
|
private static String TAG = APKUtils.class.getSimpleName();
|
||||||
|
|
||||||
public static ArrayList<ApplicationInfo> getSystemApp(Context context) {
|
public static ArrayList<ApplicationInfo> getSystemApp(Context context) {
|
||||||
@@ -58,21 +61,14 @@ public class APKUtils {
|
|||||||
Log.i(TAG, "queryFilterAppInfo: " + resolveInfo.activityInfo.packageName);
|
Log.i(TAG, "queryFilterAppInfo: " + resolveInfo.activityInfo.packageName);
|
||||||
allowPackages.add(resolveInfo.activityInfo.packageName);
|
allowPackages.add(resolveInfo.activityInfo.packageName);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ApplicationInfo app : appInfos) {
|
for (ApplicationInfo app : appInfos) {
|
||||||
if ((app.flags & ApplicationInfo.FLAG_SYSTEM) > 0)//通过flag排除系统应用,会将电话、短信也排除掉
|
if (allHintPackage.contains(app.packageName)) continue;
|
||||||
{
|
if ((app.flags & ApplicationInfo.FLAG_SYSTEM) > 0) {
|
||||||
if (allowPackages.contains(app.packageName) && !showPackageName.contains(app.packageName)) {
|
if (allowPackages.contains(app.packageName)
|
||||||
|
&& !showPackageName.contains(app.packageName)) {
|
||||||
applicationInfos.add(app);
|
applicationInfos.add(app);
|
||||||
|
Log.e(TAG, "getSystemApp: " + app.packageName);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// if(app.uid > 10000){//通过uid排除系统应用,在一些手机上效果不好
|
|
||||||
// applicationInfos.add(app);
|
|
||||||
// }
|
|
||||||
// if (allowPackages.contains(app.packageName) && !excludePackageName.contains(app.packageName)) {
|
|
||||||
//// if (allowPackages.contains(app.packageName)) {
|
|
||||||
// applicationInfos.add(app);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applicationInfos.sort(new Comparator<ApplicationInfo>() {
|
applicationInfos.sort(new Comparator<ApplicationInfo>() {
|
||||||
|
|||||||
Reference in New Issue
Block a user