diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index a1afe87..f739445 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -79,8 +79,8 @@
@@ -102,27 +102,41 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -136,7 +150,7 @@
android:value="true" />
@@ -181,7 +195,7 @@
The settings activity. To extend point settings_fragment_name to appropriate fragment class
-->
@@ -192,7 +206,7 @@
callback = successful -> {
@@ -1225,17 +1227,18 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
mPasswd.getPassword(System.currentTimeMillis());
TimeUtils.getInstance().setAppPackageName(BuildConfig.APPLICATION_ID);
HTTPInterface.sendRunningApp(Launcher.this);
- JGYUtils.getInstance().wakeUpAppstore();
- JGYUtils.getInstance().wakeUpDeviceInfo();
+ JgyUtils.getInstance().wakeUpAppstore();
+ JgyUtils.getInstance().wakeUpDeviceInfo();
checkIsRest();
+ JgyUtils.getInstance().checkAoleyunApp();
}
private void checkIsRest() {
int desktop_clear = Settings.Global.getInt(getContentResolver(), "desktop_clear", 0);
int aihuaUnlock = Settings.Global.getInt(getContentResolver(), "Aihua_unlock_state", 0);
- if ((!JGYUtils.getInstance().getDeviceIsLocked() || aihuaUnlock == 1) && desktop_clear != 1) {
+ if ((!JgyUtils.getInstance().getDeviceIsLocked() || aihuaUnlock == 1) && desktop_clear != 1) {
Settings.Global.putInt(getContentResolver(), "desktop_clear", 1);
- JGYUtils.getInstance().cleanAoleLauncher3Cache();
+ JgyUtils.getInstance().cleanAoleLauncher3Cache();
}
}
@@ -1337,7 +1340,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
.getCheckUpdateObservable()
.getCheckUpdate(BuildConfig.APPLICATION_ID,
BuildConfig.VERSION_CODE,
- JGYUtils.getInstance().checkAppPlatform())
+ JgyUtils.getInstance().checkAppPlatform())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer>() {
diff --git a/src/com/aoleyun/os/base/BaseApplication.java b/src/com/aoleyun/os/base/BaseApplication.java
index 2a7b930..98ca544 100644
--- a/src/com/aoleyun/os/base/BaseApplication.java
+++ b/src/com/aoleyun/os/base/BaseApplication.java
@@ -5,7 +5,7 @@ import android.util.Log;
import com.aoleyun.os.manager.ConnectManager;
import com.aoleyun.os.network.NetInterfaceManager;
-import com.aoleyun.os.uiuiutils.JGYUtils;
+import com.aoleyun.os.uiuiutils.JgyUtils;
import com.aoleyun.os.uiuiutils.TimeUtils;
import com.arialyy.aria.core.Aria;
import com.hjq.toast.Toaster;
@@ -20,7 +20,7 @@ public class BaseApplication extends Application {
String rootDir = MMKV.initialize(this);
Log.e(TAG, "onCreate: " + rootDir);
- JGYUtils.init(this);
+ JgyUtils.init(this);
TimeUtils.init(this);
Aria.init(this);
NetInterfaceManager.init(this);
diff --git a/src/com/aoleyun/os/folder/Folder.java b/src/com/aoleyun/os/folder/Folder.java
index 8029a47..39f5b95 100644
--- a/src/com/aoleyun/os/folder/Folder.java
+++ b/src/com/aoleyun/os/folder/Folder.java
@@ -535,7 +535,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
* is played.
*/
public void animateOpen() {
- Bitmap bm = blur(getWallpaperBg());
+// Bitmap bm = blur(getWallpaperBg());
Folder openFolder = getOpen(mLauncher);
if (openFolder != null && openFolder != this) {
// Close any open folder before opening a folder.
@@ -545,7 +545,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
mIsOpen = true;
DragLayer dragLayer = mLauncher.getDragLayer();
- dragLayer.setBackground(new BitmapDrawable(bm));
+// dragLayer.setBackground(new BitmapDrawable(bm));
// Just verify that the folder hasn't already been added to the DragLayer.
// There was a one-off crash where the folder had a parent already.
if (getParent() == null) {
diff --git a/src/com/aoleyun/os/model/LoaderTask.java b/src/com/aoleyun/os/model/LoaderTask.java
index e38b3b3..6c423d8 100644
--- a/src/com/aoleyun/os/model/LoaderTask.java
+++ b/src/com/aoleyun/os/model/LoaderTask.java
@@ -37,7 +37,6 @@ import android.os.Handler;
import android.os.Process;
import android.os.UserHandle;
import android.provider.Settings;
-import android.provider.SettingsValidators;
import android.text.TextUtils;
import android.util.Log;
import android.util.LongSparseArray;
@@ -75,7 +74,7 @@ import com.aoleyun.os.logging.FileLog;
import com.aoleyun.os.provider.ImportDataTask;
import com.aoleyun.os.shortcuts.DeepShortcutManager;
import com.aoleyun.os.shortcuts.ShortcutKey;
-import com.aoleyun.os.uiuiutils.JGYUtils;
+import com.aoleyun.os.uiuiutils.JgyUtils;
import com.aoleyun.os.util.ComponentKey;
import com.aoleyun.os.util.LooperIdleLock;
import com.aoleyun.os.util.MultiHashMap;
@@ -265,6 +264,9 @@ public class LoaderTask implements Runnable {
this.add("org.chromium.browser");
this.add("com.android.email");
this.add("com.android.soundrecorder");
+ this.add("com.elink.autotest");
+ this.add("com.emdoor.pressure.tester");
+ this.add("emdoor.digit.tester");
}};
/*爱优读需要隐藏的图标*/
@@ -289,7 +291,7 @@ public class LoaderTask implements Runnable {
/**
* 系统应用只显示这几个
*/
- public static final HashSet showApp = new HashSet() {{
+ public static final HashSet SYSTEM_FORCE_APP = new HashSet() {{
// this.add(BuildConfig.APPLICATION_ID);
//aoleyun
this.add("com.aoleyun.sn");
@@ -335,6 +337,27 @@ public class LoaderTask implements Runnable {
this.add("com.tongyi.aistudent");
}};
+ public static final HashSet SYSTEM_HIDE_APP = new HashSet() {{
+ this.add("com.android.browser");
+ this.add("com.android.calendar");
+ this.add("com.android.contacts");
+ this.add("com.android.dialer");
+ this.add("com.android.gallery3d");
+ this.add("com.android.mms");
+ this.add("com.android.music");
+ this.add("com.android.documentsui");
+ this.add("com.android.fmradio");
+ this.add("com.android.inputmethod.latin");
+ this.add("com.android.stk");
+
+ this.add("com.eduyun.app.factory.ykt");
+ this.add("com.huawei.appmarket");
+ this.add("com.qiyi.video");
+ this.add("com.ss.android.ugc.aweme");
+ this.add("com.tencent.mm");
+ }};
+
+
//add for load all app on workspace
private void verifyApplications() {
final Context context = mApp.getContext();
@@ -350,27 +373,36 @@ public class LoaderTask implements Runnable {
ArrayList added = new ArrayList();
synchronized (this) {
for (LauncherActivityInfo app : apps) {
- Log.e("verifyApplications", "AllAPP: " + app.getApplicationInfo().packageName);
- if (BuildConfig.APPLICATION_ID.equals(app.getApplicationInfo().packageName)
-// || "com.ygyb.yischool".equals(app.getApplicationInfo().packageName)
- )
+ String packageNmae = app.getApplicationInfo().packageName;
+ if (BuildConfig.APPLICATION_ID.equals(packageNmae)
+ || "com.aoleyun.ailog".equals(packageNmae)
+ ) {
continue;
+ }
+ if (SYSTEM_HIDE_APP.contains(packageNmae)) {
+ continue;
+ }
/*系统应用*/
- if (JGYUtils.getInstance().getDeviceIsLocked() && aihuaUnlock != 1) {
+ if (JgyUtils.getInstance().getDeviceIsLocked() && aihuaUnlock != 1) {
if ((app.getApplicationFlags() & ApplicationInfo.FLAG_SYSTEM) == 1) {
- if (hideApp.contains(app.getApplicationInfo().packageName)) {
- Log.e("verifyApplications", "skip1: " + app.getApplicationInfo().packageName);
+ Log.e("verifyApplications", "AllAPP system: " + app.getApplicationInfo().packageName);
+
+ if (hideApp.contains(packageNmae)) {
+ Log.e("verifyApplications", "skip1: " + packageNmae);
continue;
}
+
} else {
+ Log.e("verifyApplications", "AllAPP user: " + app.getApplicationInfo().packageName);
+
if (TextUtils.isEmpty(whiteList)) {
- if (hideApp.contains(app.getApplicationInfo().packageName)) {
- Log.e("verifyApplications", "skip2: " + app.getApplicationInfo().packageName);
+ if (hideApp.contains(packageNmae)) {
+ Log.e("verifyApplications", "skip2: " + packageNmae);
continue;
}
- } else if (!whiteList.contains(app.getApplicationInfo().packageName)) {
- if (hideApp.contains(app.getApplicationInfo().packageName)) {
- Log.e("verifyApplications", "skip3: " + app.getApplicationInfo().packageName);
+ } else if (!whiteList.contains(packageNmae)) {
+ if (hideApp.contains(packageNmae)) {
+ Log.e("verifyApplications", "skip3: " + packageNmae);
continue;
}
}
@@ -378,15 +410,15 @@ public class LoaderTask implements Runnable {
}
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
- if (AiudHideApp.contains(app.getApplicationInfo().packageName)) {
+ if (AiudHideApp.contains(packageNmae)) {
continue;
}
- if ("com.aoleyun.sn".equals(app.getApplicationInfo().packageName) && "com.aoleyun.sn.activity.CleanupActivity".equals(app.getComponentName().getClassName())) {
+ if ("com.aoleyun.sn".equals(packageNmae) && "com.aoleyun.sn.activity.CleanupActivity".equals(app.getComponentName().getClassName())) {
continue;
}
}
- Log.e("verifyApplications", "AddApp: " + app.getApplicationInfo().packageName);
+ Log.e("verifyApplications", "AddApp: " + packageNmae);
Log.e("verifyApplications", "AddApp: " + app.getApplicationInfo().classLoaderName);
InstallShortcutReceiver.PendingInstallShortcutInfo pendingInstallShortcutInfo = new InstallShortcutReceiver.PendingInstallShortcutInfo(app, context);
added.add(pendingInstallShortcutInfo);
@@ -972,6 +1004,9 @@ public class LoaderTask implements Runnable {
for (int i = 0; i < apps.size(); i++) {
LauncherActivityInfo app = apps.get(i);
// This builds the icon bitmaps.
+ if (SYSTEM_HIDE_APP.contains(app.getComponentName().getPackageName())) {
+ continue;
+ }
mBgAllAppsList.add(new AppInfo(app, user, quietMode), app);
}
allActivityList.addAll(apps);
diff --git a/src/com/aoleyun/os/model/PackageUpdatedTask.java b/src/com/aoleyun/os/model/PackageUpdatedTask.java
index 59b5d8d..6126fbe 100644
--- a/src/com/aoleyun/os/model/PackageUpdatedTask.java
+++ b/src/com/aoleyun/os/model/PackageUpdatedTask.java
@@ -45,7 +45,7 @@ import com.aoleyun.os.icons.BitmapInfo;
import com.aoleyun.os.icons.LauncherIcons;
import com.aoleyun.os.logging.FileLog;
import com.aoleyun.os.shortcuts.DeepShortcutManager;
-import com.aoleyun.os.uiuiutils.JGYUtils;
+import com.aoleyun.os.uiuiutils.JgyUtils;
import com.aoleyun.os.util.FlagOp;
import com.aoleyun.os.util.IntSparseArrayMap;
import com.aoleyun.os.util.ItemInfoMatcher;
@@ -105,7 +105,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
case OP_ADD: {
for (int i = 0; i < N; i++) {
if (DEBUG) Log.e(TAG, "mAllAppsList.addPackage " + packages[i]);
- if (JGYUtils.getInstance().getDeviceIsLocked()) {
+ if (JgyUtils.getInstance().getDeviceIsLocked()) {
if (hideAppList.contains(packages[i])) continue;
}
iconCache.updateIconsForPkg(packages[i], mUser);
@@ -125,9 +125,11 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
case OP_UPDATE:
for (int i = 0; i < N; i++) {
if (DEBUG) Log.e(TAG, "mAllAppsList.updatePackage " + packages[i]);
- iconCache.updateIconsForPkg(packages[i], mUser);
- appsList.updatePackage(context, packages[i], mUser);
- app.getWidgetCache().removePackage(packages[i], mUser);
+ if (!LoaderTask.SYSTEM_HIDE_APP.contains(packages[i])) {
+ iconCache.updateIconsForPkg(packages[i], mUser);
+ appsList.updatePackage(context, packages[i], mUser);
+ app.getWidgetCache().removePackage(packages[i], mUser);
+ }
}
// Since package was just updated, the target must be available now.
flagOp = FlagOp.removeFlag(WorkspaceItemInfo.FLAG_DISABLED_NOT_AVAILABLE);
diff --git a/src/com/aoleyun/os/network/NetInterfaceManager.java b/src/com/aoleyun/os/network/NetInterfaceManager.java
index fe68b0a..815fc0c 100644
--- a/src/com/aoleyun/os/network/NetInterfaceManager.java
+++ b/src/com/aoleyun/os/network/NetInterfaceManager.java
@@ -19,13 +19,11 @@ import com.aoleyun.os.network.bean.AppPasswdBean;
import com.aoleyun.os.network.bean.BaseResponse;
import com.aoleyun.os.network.bean.Batch;
import com.aoleyun.os.network.interceptor.RepeatRequestInterceptor;
-import com.aoleyun.os.uiuiutils.JGYUtils;
+import com.aoleyun.os.uiuiutils.JgyUtils;
import com.aoleyun.os.uiuiutils.Utils;
import com.tencent.mmkv.MMKV;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -179,29 +177,31 @@ public class NetInterfaceManager {
public void setPushTag(onCompleteCallback callback) {
Set set = new HashSet();
- JGYUtils.getInstance().getAppPlatform(new JGYUtils.GetAppPlatformCallback() {
+ JgyUtils.getInstance().getAppPlatform(new JgyUtils.GetAppPlatformCallback() {
@Override
public void AppPlatform(int platform) {
- if (platform == JGYUtils.MTKPlatform) {
- set.add(JGYUtils.MTKTag);
- } else if (platform == JGYUtils.ZhanruiPlatform) {
- set.add(JGYUtils.ZhanruiTag);
- } else if (platform == JGYUtils.CubePlatform) {
- set.add(JGYUtils.CubeTag);
- } else if (platform == JGYUtils.MTK11Platform) {
- set.add(JGYUtils.MTK11Tag);
- } else if (platform == JGYUtils.TeclastP20sPlatform) {
- set.add(JGYUtils.TeclastP20sTag);
- } else if (platform == JGYUtils.AH6016Platform) {
- set.add(JGYUtils.AH6016Tag);
- } else if (platform == JGYUtils.ZR6016Platform) {
- set.add(JGYUtils.ZR6016Tag);
- } else if (platform == JGYUtils.G10PPlatform) {
- set.add(JGYUtils.G10PTag);
- } else if (platform == JGYUtils.C2Platform) {
- set.add(JGYUtils.C2Tag);
- } else if (platform == JGYUtils.AUDG104Platform) {
- set.add(JGYUtils.AUDG104Tag);
+ if (platform == JgyUtils.MTKPlatform) {
+ set.add(JgyUtils.MTKTag);
+ } else if (platform == JgyUtils.ZhanruiPlatform) {
+ set.add(JgyUtils.ZhanruiTag);
+ } else if (platform == JgyUtils.CubePlatform) {
+ set.add(JgyUtils.CubeTag);
+ } else if (platform == JgyUtils.MTK11Platform) {
+ set.add(JgyUtils.MTK11Tag);
+ } else if (platform == JgyUtils.TeclastP20sPlatform) {
+ set.add(JgyUtils.TeclastP20sTag);
+ } else if (platform == JgyUtils.AH6016Platform) {
+ set.add(JgyUtils.AH6016Tag);
+ } else if (platform == JgyUtils.ZR6016Platform) {
+ set.add(JgyUtils.ZR6016Tag);
+ } else if (platform == JgyUtils.G10PPlatform) {
+ set.add(JgyUtils.G10PTag);
+ } else if (platform == JgyUtils.C2Platform) {
+ set.add(JgyUtils.C2Tag);
+ } else if (platform == JgyUtils.AUDG104Platform) {
+ set.add(JgyUtils.AUDG104Tag);
+ } else if (platform == JgyUtils.seewoPlatform) {
+ set.add(JgyUtils.seewoTag);
}
}
});
diff --git a/src/com/aoleyun/os/receiver/NewAppReceiver.java b/src/com/aoleyun/os/receiver/NewAppReceiver.java
new file mode 100644
index 0000000..db51a48
--- /dev/null
+++ b/src/com/aoleyun/os/receiver/NewAppReceiver.java
@@ -0,0 +1,54 @@
+package com.aoleyun.os.receiver;
+
+import android.annotation.SuppressLint;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.aoleyun.os.uiuiutils.ApkUtils;
+import com.aoleyun.os.uiuiutils.CmdUtil;
+import com.aoleyun.os.uiuiutils.JgyUtils;
+
+public class NewAppReceiver extends BroadcastReceiver {
+ private static final String TAG = "NewAppReceiver";
+
+ @SuppressLint("StaticFieldLeak")
+ private static Context mContext;
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ mContext = context;
+ String action = intent.getAction();
+ Log.e(TAG, "onReceive: " + "action = " + action);
+ if (TextUtils.isEmpty(action)) {
+ Log.e(TAG, "onReceive: " + "action is empty ");
+ return;
+ }
+ String packageName = intent.getDataString().replace("package:", "");
+ String state;
+ switch (action) {
+ case Intent.ACTION_PACKAGE_ADDED:
+ state = "安装了:";
+ break;
+ case Intent.ACTION_PACKAGE_REPLACED:
+ state = "重装了:";
+ break;
+ case Intent.ACTION_PACKAGE_REMOVED:
+ JgyUtils.getInstance().checkAoleyunApp();
+ state = "卸载了:";
+ break;
+ case Intent.ACTION_PACKAGE_CHANGED:
+ // 判断是禁用还是启用
+ boolean isDisabled = ApkUtils.isDisable(mContext, packageName);
+ JgyUtils.getInstance().checkAoleyunApp();
+ state = (isDisabled ? "禁用:" : "启用:");
+ break;
+ default:
+ state = "未知:";
+ break;
+ }
+ Log.e(TAG, "sendAppInfo: " + state + packageName);
+ }
+}
diff --git a/src/com/aoleyun/os/touch/ItemClickHandler.java b/src/com/aoleyun/os/touch/ItemClickHandler.java
index a186393..72b646f 100644
--- a/src/com/aoleyun/os/touch/ItemClickHandler.java
+++ b/src/com/aoleyun/os/touch/ItemClickHandler.java
@@ -45,19 +45,15 @@ import com.aoleyun.os.Launcher;
import com.aoleyun.os.LauncherAppWidgetInfo;
import com.aoleyun.os.LauncherAppWidgetProviderInfo;
import com.aoleyun.os.uiuiutils.CustomDialog;
-import com.aoleyun.os.uiuiutils.JGYUtils;
+import com.aoleyun.os.uiuiutils.JgyUtils;
import com.hjq.toast.Toaster;
-import com.aoleyun.os.base.BaseApplication;
import com.aoleyun.os.PromiseAppInfo;
import com.aoleyun.os.R;
-import com.aoleyun.os.statistics.AppInformation;
-import com.aoleyun.os.statistics.StatisticsInfo;
import com.aoleyun.os.WorkspaceItemInfo;
import com.aoleyun.os.compat.AppWidgetManagerCompat;
import com.aoleyun.os.folder.Folder;
import com.aoleyun.os.folder.FolderIcon;
import com.aoleyun.os.network.bean.AppPasswdBean;
-import com.aoleyun.os.network.HTTPInterface;
import com.aoleyun.os.testing.TestProtocol;
import com.aoleyun.os.uiuiutils.TimeUtils;
import com.aoleyun.os.util.PackageManagerHelper;
@@ -183,10 +179,10 @@ public class ItemClickHandler {
}
private static boolean is_forbid(Context context, String pkg) {
- if (JGYUtils.isUnlocked(context)) {
+ if (JgyUtils.isUnlocked(context)) {
return false;
}
- if (JGYUtils.isDisable(context, pkg)) {
+ if (JgyUtils.isDisable(context, pkg)) {
Toaster.show("应用已被禁用");
return true;
}
diff --git a/src/com/aoleyun/os/uiuiutils/ApkUtils.java b/src/com/aoleyun/os/uiuiutils/ApkUtils.java
index 4c9f744..2e86726 100644
--- a/src/com/aoleyun/os/uiuiutils/ApkUtils.java
+++ b/src/com/aoleyun/os/uiuiutils/ApkUtils.java
@@ -105,6 +105,20 @@ public class ApkUtils {
return intent;
}
+ /**
+ * 检查手机上是否安装了指定的软件
+ */
+ public static boolean isAvailable(Context context, String packageName) {
+ PackageManager packageManager = context.getPackageManager();
+ PackageInfo info = null;
+ try {
+ info = packageManager.getPackageInfo(packageName, 0);
+ } catch (PackageManager.NameNotFoundException e) {
+ e.printStackTrace();
+ }
+ return info != null;
+ }
+
//判断是否为系统应用
public static boolean isSystemApp(Context context, String pkgName) {
boolean isSystemApp = false;
@@ -127,6 +141,15 @@ public class ApkUtils {
return isSystemApp;
}
+ public static boolean isDisable(Context context, String pkg) {
+ PackageManager pm = context.getPackageManager();
+ if (pm.getApplicationEnabledSetting(pkg) == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
//获取APP版本号
public static String getAPPVersionName(Context context, String packageName) {
String versionName = "0";
diff --git a/src/com/aoleyun/os/uiuiutils/JGYUtils.java b/src/com/aoleyun/os/uiuiutils/JgyUtils.java
similarity index 66%
rename from src/com/aoleyun/os/uiuiutils/JGYUtils.java
rename to src/com/aoleyun/os/uiuiutils/JgyUtils.java
index 94d2a30..fb07860 100644
--- a/src/com/aoleyun/os/uiuiutils/JGYUtils.java
+++ b/src/com/aoleyun/os/uiuiutils/JgyUtils.java
@@ -20,11 +20,11 @@ import java.util.Arrays;
import java.util.HashSet;
-public class JGYUtils {
- private static final String TAG = JGYUtils.class.getSimpleName();
+public class JgyUtils {
+ private static final String TAG = JgyUtils.class.getSimpleName();
@SuppressLint("StaticFieldLeak")
- private static JGYUtils sInstance;
+ private static JgyUtils sInstance;
private Context mContext;
private ContentResolver mResolver;
@@ -44,7 +44,7 @@ public class JGYUtils {
public static final int G11Platform = 16;
public static final int MT8768Platform = 17;
public static final int AUDG104Platform = 18;
-
+ public static final int seewoPlatform = 25;
public static final String Other = "其他";
public static final String MTKTag = "MTK";
@@ -61,8 +61,10 @@ public class JGYUtils {
public static final String G11TAG = "MTKG11";
public static final String MT8768Tag = "MT8768";
public static final String AUDG104Tag = "AUDG104";
+ public static final String seewoTag = "seewo";
- private JGYUtils(Context context) {
+
+ private JgyUtils(Context context) {
if (context == null) {
throw new RuntimeException("Context is NULL");
}
@@ -72,13 +74,13 @@ public class JGYUtils {
public static void init(Context context) {
if (sInstance == null) {
- sInstance = new JGYUtils(context);
+ sInstance = new JgyUtils(context);
}
}
- public static JGYUtils getInstance() {
+ public static JgyUtils getInstance() {
if (sInstance == null) {
- throw new IllegalStateException("You must be init JGYUtils first");
+ throw new IllegalStateException("You must be init JgyUtils first");
}
return sInstance;
}
@@ -115,6 +117,9 @@ public class JGYUtils {
} else if (AUDG104Tag.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "AUDG104");
return AUDG104Platform;
+ } else if (seewoTag.equalsIgnoreCase(platform)) {
+ Log.i(TAG, "checkAppPlatform: " + "seewo");
+ return seewoPlatform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -147,23 +152,25 @@ public class JGYUtils {
getAppPlatformCallback.AppPlatform(C2Platform);
} else if (AUDG104Tag.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(AUDG104Platform);
+ } else if (seewoTag.equalsIgnoreCase(platform)) {
+ getAppPlatformCallback.AppPlatform(seewoPlatform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
}
public static boolean isOfficialVersion() {
- String channelValue = JGYUtils.getInstance().getStringMetaData();
+ String channelValue = JgyUtils.getInstance().getStringMetaData();
return "official".equals(channelValue);
}
public static boolean isNewlyVersion() {
- String channelValue = JGYUtils.getInstance().getStringMetaData();
+ String channelValue = JgyUtils.getInstance().getStringMetaData();
return "beta".equals(channelValue);
}
public static boolean isBetaVersion() {
- String channelValue = JGYUtils.getInstance().getStringMetaData();
+ String channelValue = JgyUtils.getInstance().getStringMetaData();
return "beta".equals(channelValue);
}
@@ -185,7 +192,7 @@ public class JGYUtils {
}
public static String getCustomVersion() {
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
+ if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.ZhanruiPlatform) {
return getProperty("ro.build.display.id", "获取失败");
} else {
return getProperty("ro.custom.build.version", "获取失败");
@@ -193,7 +200,7 @@ public class JGYUtils {
}
public static String getRomVersion() {
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
+ if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.ZhanruiPlatform) {
return getProperty("ro.build.id", "获取失败");
} else {
return getProperty("ro.build.display.id", "获取失败");
@@ -227,7 +234,7 @@ public class JGYUtils {
if (TextUtils.isEmpty(appString)) return false;
Log.e("isEnforceApp", "appString: " + appString);
HashSet appSet = new HashSet<>(Arrays.asList(appString.split(",")));
- appSet.addAll(LoaderTask.showApp);
+ appSet.addAll(LoaderTask.SYSTEM_FORCE_APP);
return appSet.contains(pkg);
}
@@ -293,5 +300,77 @@ public class JGYUtils {
}
}
+ public void checkAoleyunApp() {
+ boolean availableSn = ApkUtils.isAvailable(mContext, "com.aoleyun.sn");
+ if (availableSn) {
+ boolean disableSn = ApkUtils.isDisable(mContext, "com.aoleyun.sn");
+ Log.e(TAG, "checkAoleyunApp: sn isAvailable = " + availableSn);
+ if (disableSn) {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.sn");
+ Log.e(TAG, "checkAoleyunApp: sn install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.sn");
+ Log.e(TAG, "checkAoleyunApp: sn enable = " + enableResult);
+ }
+ } else {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.sn");
+ Log.e(TAG, "checkAoleyunApp: sn install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.sn");
+ Log.e(TAG, "checkAoleyunApp: sn enable = " + enableResult);
+ }
+
+// boolean availableAudos = ApkUtils.isAvailable(mContext, "com.aoleyun.audos");
+// if (availableAudos) {
+// boolean disableAudos = ApkUtils.isDisable(mContext, "com.aoleyun.audos");
+// Log.e(TAG, "checkAoleyunApp: audos isAvailable = " + availableAudos);
+// if (disableAudos) {
+// CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.audos");
+// Log.e(TAG, "checkAoleyunApp: audos install = " + installResult);
+// CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.audos");
+// Log.e(TAG, "checkAoleyunApp: audos enable = " + enableResult);
+// }
+// } else {
+// CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.audos");
+// Log.e(TAG, "checkAoleyunApp: audos install = " + installResult);
+// CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.audos");
+// Log.e(TAG, "checkAoleyunApp: audos enable = " + enableResult);
+// }
+
+ boolean availableOs = ApkUtils.isAvailable(mContext, "com.aoleyun.os");
+ if (availableOs) {
+ boolean disableOs = ApkUtils.isDisable(mContext, "com.aoleyun.os");
+ Log.e(TAG, "checkAoleyunApp: os isAvailable = " + availableOs);
+ if (disableOs) {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.os");
+ Log.e(TAG, "checkAoleyunApp: os install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.os");
+ Log.e(TAG, "checkAoleyunApp: os enable = " + enableResult);
+ }
+ } else {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.os");
+ Log.e(TAG, "checkAoleyunApp: os install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.os");
+ Log.e(TAG, "checkAoleyunApp: os enable = " + enableResult);
+ }
+
+
+ boolean availableAppstore = ApkUtils.isAvailable(mContext, "com.aoleyun.appstore");
+ if (availableAppstore) {
+ boolean disableAppstore = ApkUtils.isDisable(mContext, "com.aoleyun.appstore");
+ Log.e(TAG, "checkAoleyunApp: appstore isAvailable = " + availableAppstore);
+ if (disableAppstore) {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.appstore");
+ Log.e(TAG, "checkAoleyunApp: appstore install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.appstore");
+ Log.e(TAG, "checkAoleyunApp: appstore enable = " + enableResult);
+ }
+ } else {
+ CmdUtil.Result installResult = CmdUtil.execute("cmd package install-existing com.aoleyun.appstore");
+ Log.e(TAG, "checkAoleyunApp: appstore install = " + installResult);
+ CmdUtil.Result enableResult = CmdUtil.execute("pm enable com.aoleyun.appstore");
+ Log.e(TAG, "checkAoleyunApp: appstore enable = " + enableResult);
+ }
+
+ }
+
}
diff --git a/src_shortcuts_overrides/com/aoleyun/os/shortcuts/DeepShortcutManager.java b/src_shortcuts_overrides/com/aoleyun/os/shortcuts/DeepShortcutManager.java
index 984cf1f..b758503 100644
--- a/src_shortcuts_overrides/com/aoleyun/os/shortcuts/DeepShortcutManager.java
+++ b/src_shortcuts_overrides/com/aoleyun/os/shortcuts/DeepShortcutManager.java
@@ -31,7 +31,6 @@ 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;