version:4.5
fix: update:优化aihua版本
This commit is contained in:
59
build.gradle
59
build.gradle
@@ -2,7 +2,7 @@ buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven {url 'http://developer.huawei.com/repo/'}
|
||||
maven { url 'http://developer.huawei.com/repo/' }
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
@@ -43,7 +43,7 @@ android {
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
Set<File> fileSet = options.bootstrapClasspath.getFiles()
|
||||
List<File> newFileList = new ArrayList<>();
|
||||
List<File> newFileList = new ArrayList<>();
|
||||
//JAVA语法,可连续调用,输入参数建议为相对路径
|
||||
newFileList.add(new File("libs/framework.jar"))
|
||||
//最后将原始参数添加
|
||||
@@ -65,19 +65,17 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 35
|
||||
versionName "4.4"
|
||||
versionCode 36
|
||||
versionName "4.5"
|
||||
ndk {
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
|
||||
}
|
||||
|
||||
manifestPlaceholders = [
|
||||
XG_ACCESS_ID : "1500026378",
|
||||
XG_ACCESS_KEY: "AH5QD9ZMBJ6R",
|
||||
// JPUSH_PKGNAME: "com.aoleyun.os",
|
||||
// JPUSH_APPKEY : "0c7ba5a1622dba78d5bd00cc", //JPush 上注册的包名对应的 Appkey.
|
||||
// JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
]
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -86,16 +84,16 @@ android {
|
||||
|
||||
//签名
|
||||
signingConfigs {
|
||||
alldocube {
|
||||
zhanRui {
|
||||
storeFile file("src/doc/zhanxun.keystore")
|
||||
storePassword "123456"
|
||||
keyAlias "zhanxun"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled false
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
alldocubeDebug {
|
||||
zhanRuiUserdebug {
|
||||
storeFile file("src/doc/zhanxunUserdebug.keystore")
|
||||
storePassword "123456"
|
||||
keyAlias "zhanxunUserdebug"
|
||||
@@ -103,32 +101,55 @@ android {
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled false
|
||||
}
|
||||
|
||||
mtk {
|
||||
storeFile file("src/doc/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
alldocubeDebug.initWith(debug)
|
||||
alldocubeDebug {
|
||||
zhanRuiDebug.initWith(debug)
|
||||
zhanRuiDebug {
|
||||
versionNameSuffix "-debug"
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
debuggable true
|
||||
signingConfig signingConfigs.zhanRui
|
||||
}
|
||||
|
||||
zhanRuiRelease.initWith(release)
|
||||
zhanRuiRelease {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
signingConfig signingConfigs.zhanRui
|
||||
}
|
||||
|
||||
alldocubeDebug.initWith(debug)
|
||||
alldocubeDebug {
|
||||
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
||||
debuggable true
|
||||
versionNameSuffix "-debug"
|
||||
signingConfig signingConfigs.alldocubeDebug
|
||||
signingConfig signingConfigs.zhanRuiUserdebug
|
||||
}
|
||||
|
||||
alldocubeDebugReleas.initWith(release)
|
||||
alldocubeDebugReleas {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
signingConfig signingConfigs.alldocubeDebug
|
||||
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
||||
signingConfig signingConfigs.zhanRuiUserdebug
|
||||
}
|
||||
|
||||
debug {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
debuggable true
|
||||
versionNameSuffix "-debug"
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.alldocube
|
||||
signingConfig signingConfigs.mtk
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
@@ -141,7 +162,7 @@ android {
|
||||
}
|
||||
|
||||
release {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||||
@@ -149,7 +170,7 @@ android {
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
//签名
|
||||
signingConfig signingConfigs.alldocube
|
||||
signingConfig signingConfigs.mtk
|
||||
//将release版本的包名重命名,加上版本及日期
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
|
||||
@@ -13,6 +13,14 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
zhanRuiDebug {
|
||||
minifyEnabled false
|
||||
}
|
||||
|
||||
zhanRuiRelease {
|
||||
minifyEnabled false
|
||||
}
|
||||
|
||||
alldocubeDebug {
|
||||
minifyEnabled false
|
||||
}
|
||||
@@ -20,11 +28,12 @@ android {
|
||||
alldocubeDebugReleas {
|
||||
minifyEnabled false
|
||||
}
|
||||
|
||||
debug {
|
||||
minifyEnabled false
|
||||
}
|
||||
|
||||
release {
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,6 +585,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
// }
|
||||
|
||||
public void setRoleHolderAsUser(Context context, String packageName) {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
|
||||
return;
|
||||
}
|
||||
String roleName = "android.app.role.HOME";
|
||||
boolean add = true;
|
||||
int flags = 0;
|
||||
@@ -593,21 +596,24 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
Log.i("settingssssssstemf", (add ? "Adding" : "Removing") + " package as role holder, role: "
|
||||
+ roleName + ", package: " + packageName);
|
||||
|
||||
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
||||
Executor executor = context.getMainExecutor();
|
||||
Consumer<Boolean> callback = successful -> {
|
||||
if (successful) {
|
||||
Log.d("settingssssssstemf", "Package " + (add ? "added" : "removed")
|
||||
+ " as role holder, role: " + roleName + ", package: " + packageName);
|
||||
} else {
|
||||
Log.d("settingssssssstemf", "Failed to " + (add ? "add" : "remove")
|
||||
+ " package as role holder, role: " + roleName + ", package: "
|
||||
+ packageName);
|
||||
}
|
||||
};
|
||||
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.MTKPlatform) {
|
||||
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
||||
Executor executor = context.getMainExecutor();
|
||||
Consumer<Boolean> callback = successful -> {
|
||||
if (successful) {
|
||||
Log.d("settingssssssstemf", "Package " + (add ? "added" : "removed")
|
||||
+ " as role holder, role: " + roleName + ", package: " + packageName);
|
||||
} else {
|
||||
Log.d("settingssssssstemf", "Failed to " + (add ? "add" : "remove")
|
||||
+ " package as role holder, role: " + roleName + ", package: "
|
||||
+ packageName);
|
||||
}
|
||||
};
|
||||
|
||||
roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback);
|
||||
Log.i("settingssssssstemf", "addRoleHolderAsUser done");
|
||||
}
|
||||
|
||||
roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback);
|
||||
Log.i("settingssssssstemf", "addRoleHolderAsUser done");
|
||||
}
|
||||
|
||||
private TimeChangedReceiver mTimeChangedReceiver;
|
||||
@@ -1403,7 +1409,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
}
|
||||
|
||||
private void checkAppUpdate(NewestAppUpdateResult result) {
|
||||
int app_version_code = result.getVersion_code();
|
||||
int version_code = result.getVersion_code();
|
||||
String app_package = result.getApp_package();
|
||||
String url = result.getUrl();
|
||||
PackageInfo info = null;
|
||||
@@ -1412,7 +1418,13 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (info == null || info.versionCode < app_version_code || info.getLongVersionCode() < app_version_code) {
|
||||
long appVersionCode;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
appVersionCode = info.getLongVersionCode();
|
||||
} else {
|
||||
appVersionCode = info.versionCode;
|
||||
}
|
||||
if (info != null && appVersionCode < version_code) {
|
||||
Aria.download(this)
|
||||
.load(url)
|
||||
.setExtendField(result.toString())
|
||||
|
||||
@@ -231,36 +231,37 @@ public class IconCache extends BaseIconCache {
|
||||
info.applyFrom((entry.icon == null) ? getDefaultIcon(info.user) : entry);
|
||||
}
|
||||
|
||||
private List<String> appClassNameList = new ArrayList<String>() {
|
||||
{
|
||||
this.add("com.aoleyun.appstore.activity.SplashActivity");//应用市场
|
||||
this.add("com.aoleyun.browser.BrowserActivity");//浏览器
|
||||
this.add("com.aoleyun.sn.activity.SplashActivity");//
|
||||
this.add("com.aoleyun.info.activity.main.MainActivity");//
|
||||
this.add("com.android.calculator2.Calculator");//计算器
|
||||
this.add("com.android.calendar.AllInOneActivity");//日历
|
||||
this.add("com.android.camera.CameraLauncher");//相机
|
||||
this.add("com.mediatek.camera.CameraLauncher");//相机
|
||||
this.add("com.android.contacts.activities.PeopleActivity");//通讯录
|
||||
this.add("com.android.deskclock.DeskClock");//时钟
|
||||
this.add("com.android.dialer.DialtactsActivity");//电话
|
||||
this.add("com.android.dialer.main.impl.MainActivity");//电话
|
||||
this.add("com.android.gallery3d.v2.app.GalleryActivity2");//图库
|
||||
this.add("com.android.messaging.ui.conversationlist.ConversationListActivity");//信息
|
||||
this.add("com.android.music.MusicBrowserActivity");//音乐
|
||||
this.add("com.android.providers.downloads.ui.DownloadList");//下载
|
||||
this.add("com.android.quicksearchbox.SearchActivity");//搜索
|
||||
this.add("com.android.settings.Settings");//设置
|
||||
this.add("com.sprd.soundrecorder.RecorderActivity");//录音机
|
||||
this.add("com.android.stk.StkMain");//sim卡
|
||||
this.add("com.sprd.gallery3d.app.NewVideoActivity");//视频
|
||||
this.add("com.mediatek.filemanager.FileManagerOperationActivity");//文件管理
|
||||
this.add("com.android.documentsui.LauncherActivity");//下载
|
||||
this.add("com.mediatek.fmradio.FmRadioActivity");//收音机
|
||||
this.add("com.android.fmradio.FmMainActivity");//收音机
|
||||
this.add("com.android.email.activity.Welcome");//电子邮件
|
||||
}
|
||||
};
|
||||
private List<String> appClassNameList = new ArrayList<String>() {{
|
||||
this.add("com.aoleyun.appstore.activity.SplashActivity");//应用市场
|
||||
this.add("com.aoleyun.browser.BrowserActivity");//浏览器
|
||||
this.add("com.aoleyun.sn.activity.SplashActivity");//
|
||||
this.add("com.aoleyun.info.activity.main.MainActivity");//
|
||||
this.add("com.android.calculator2.Calculator");//计算器
|
||||
this.add("com.android.calendar.AllInOneActivity");//日历
|
||||
this.add("com.android.camera.CameraLauncher");//相机
|
||||
this.add("com.mediatek.camera.CameraLauncher");//相机
|
||||
this.add("com.android.contacts.activities.PeopleActivity");//通讯录
|
||||
this.add("com.android.deskclock.DeskClock");//时钟
|
||||
this.add("com.android.dialer.DialtactsActivity");//电话
|
||||
this.add("com.android.dialer.app.DialtactsActivity");//电话
|
||||
this.add("com.android.dialer.main.impl.MainActivity");//电话
|
||||
this.add("com.android.gallery3d.v2.app.GalleryActivity2");//图库
|
||||
this.add("com.android.gallery3d.app.GalleryActivity");//图库
|
||||
this.add("com.android.messaging.ui.conversationlist.ConversationListActivity");//信息
|
||||
this.add("com.android.music.MusicBrowserActivity");//音乐
|
||||
this.add("com.android.providers.downloads.ui.DownloadList");//下载
|
||||
this.add("com.android.quicksearchbox.SearchActivity");//搜索
|
||||
this.add("com.android.settings.Settings");//设置
|
||||
this.add("com.sprd.soundrecorder.RecorderActivity");//录音机
|
||||
this.add("com.android.soundrecorder.SoundRecorder");//录音机
|
||||
this.add("com.android.stk.StkMain");//sim卡
|
||||
this.add("com.sprd.gallery3d.app.NewVideoActivity");//视频
|
||||
this.add("com.mediatek.filemanager.FileManagerOperationActivity");//文件管理
|
||||
this.add("com.android.documentsui.LauncherActivity");//下载
|
||||
this.add("com.mediatek.fmradio.FmRadioActivity");//收音机
|
||||
this.add("com.android.fmradio.FmMainActivity");//收音机
|
||||
this.add("com.android.email.activity.Welcome");//电子邮件
|
||||
}};
|
||||
private List<String> appIconList = new ArrayList<String>() {{
|
||||
this.add("com_android_appstore");
|
||||
this.add("com_android_browser");
|
||||
@@ -274,6 +275,8 @@ public class IconCache extends BaseIconCache {
|
||||
this.add("com_android_deskclock");
|
||||
this.add("com_android_dialer");
|
||||
this.add("com_android_dialer");
|
||||
this.add("com_android_dialer");
|
||||
this.add("com_android_gallery3d_app");
|
||||
this.add("com_android_gallery3d_app");
|
||||
this.add("com_android_mms_ui");
|
||||
this.add("com_android_music");
|
||||
@@ -281,6 +284,7 @@ public class IconCache extends BaseIconCache {
|
||||
this.add("com_android_quicksearchbox");
|
||||
this.add("com_android_settings");
|
||||
this.add("com_android_soundrecorder");
|
||||
this.add("com_android_soundrecorder");
|
||||
this.add("com_android_stk_stkmain");
|
||||
this.add("com_android_vdieo");
|
||||
this.add("com_mediatek_filemanager");
|
||||
|
||||
@@ -28,10 +28,19 @@ public class JGYUtils {
|
||||
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;
|
||||
public static int MTKPlatform = 1;
|
||||
// TODO: 2022/4/23 标签替换未完成
|
||||
public static int CubePlatform = 2;
|
||||
public static int ZhanruiPlatform = 3;
|
||||
|
||||
|
||||
public static String Other = "其他";
|
||||
public static String MTKTag = "MTK";
|
||||
// TODO: 2022/4/23 标签替换未完成
|
||||
public static String CubeTag = "展锐cube";
|
||||
public static String ZhanruiTag = "展锐";
|
||||
|
||||
|
||||
@@ -56,6 +65,74 @@ public class JGYUtils {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public int checkSNPlatform(String sn) {
|
||||
String secondChars = sn.substring(1, 2);
|
||||
if ("N".equalsIgnoreCase(secondChars)) {//MTK平台
|
||||
return MTKPlatform;
|
||||
} else if ("R".equalsIgnoreCase(secondChars)) {//展锐平台
|
||||
return ZhanruiPlatform;
|
||||
} else {
|
||||
Log.e(TAG, "checkSNPlatform: " + "sn: " + sn + "没有对应平台");
|
||||
return UnknowPlatform;
|
||||
}
|
||||
}
|
||||
|
||||
public int checkAppPlatform() {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "MTK平台");
|
||||
return MTKPlatform;
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "展锐平台");
|
||||
return ZhanruiPlatform;
|
||||
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "酷比平台");
|
||||
return CubePlatform;
|
||||
} else {
|
||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||
return UnknowPlatform;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSamePlatform(String platform) {
|
||||
String AppPlatform = BuildConfig.platform;
|
||||
if ("ZhanRui".equals(AppPlatform)) {
|
||||
return ZhanruiTag.equals(platform);
|
||||
} else {
|
||||
return AppPlatform.equals(platform);
|
||||
}
|
||||
}
|
||||
|
||||
public interface GetAppPlatformCallback {
|
||||
void AppPlatform(int platform);
|
||||
}
|
||||
|
||||
public void getAppPlatform(GetAppPlatformCallback getAppPlatformCallback) {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(MTKPlatform);
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(ZhanruiPlatform);
|
||||
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(CubePlatform);
|
||||
} else {
|
||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||
}
|
||||
}
|
||||
|
||||
public String getAppPlatform() {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
return MTKTag;
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
return ZhanruiTag;
|
||||
} else if ("ZhanRuiCube".equalsIgnoreCase(platform)) {
|
||||
return CubeTag;
|
||||
} else {
|
||||
return Other;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isOfficialVersion() {
|
||||
String channelValue = JGYUtils.getInstance().getStringMetaData();
|
||||
return "official".equals(channelValue);
|
||||
@@ -88,56 +165,6 @@ public class JGYUtils {
|
||||
return value;
|
||||
}
|
||||
|
||||
public int checkSNPlatform(String sn) {
|
||||
String secondChars = sn.substring(1, 2);
|
||||
if ("N".equalsIgnoreCase(secondChars)) {//MTK平台
|
||||
return MTKPlatform;
|
||||
} else if ("R".equalsIgnoreCase(secondChars)) {//展锐平台
|
||||
return ZhanruiPlatform;
|
||||
} else {
|
||||
Log.e(TAG, "checkSNPlatform: " + "sn: " + sn + "没有对应平台");
|
||||
return UnknowPlatform;
|
||||
}
|
||||
}
|
||||
|
||||
public int checkAppPlatform() {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "MTK平台");
|
||||
return MTKPlatform;
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "展锐平台");
|
||||
return ZhanruiPlatform;
|
||||
} else {
|
||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||
return UnknowPlatform;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSamePlatform(String platform) {
|
||||
String AppPlatform = BuildConfig.platform;
|
||||
if ("ZhanRui".equals(AppPlatform)) {
|
||||
return ZhanruiTag.equals(platform);
|
||||
} else {
|
||||
return AppPlatform.equals(platform);
|
||||
}
|
||||
}
|
||||
|
||||
public interface GetAppPlatformCallback {
|
||||
void AppPlatform(int platform);
|
||||
}
|
||||
|
||||
public void getAppPlatform(GetAppPlatformCallback getAppPlatformCallback) {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(MTKPlatform);
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(ZhanruiPlatform);
|
||||
} else {
|
||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getCustomVersion() {
|
||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
|
||||
return getProperty("ro.build.display.id", "获取失败");
|
||||
|
||||
BIN
src/doc/xueshibaoos.jks
Normal file
BIN
src/doc/xueshibaoos.jks
Normal file
Binary file not shown.
@@ -23,6 +23,7 @@ import android.content.pm.LauncherApps.ShortcutQuery;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
@@ -30,6 +31,7 @@ import android.util.Log;
|
||||
import com.aoleyun.os.ItemInfo;
|
||||
import com.aoleyun.os.LauncherSettings;
|
||||
import com.aoleyun.os.WorkspaceItemInfo;
|
||||
import com.aoleyun.os.uiuiutils.JGYUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -199,6 +201,9 @@ public class DeepShortcutManager {
|
||||
q.setShortcutIds(shortcutIds);
|
||||
}
|
||||
List<ShortcutInfo> shortcutInfos = null;
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
try {
|
||||
shortcutInfos = mLauncherApps.getShortcuts(q, user);
|
||||
mWasLastCallSuccess = true;
|
||||
|
||||
Reference in New Issue
Block a user