1.5.0522 增加应用卸载和隐藏监听
This commit is contained in:
@@ -79,8 +79,8 @@
|
||||
<uses-permission android:name="${packageName}.permission.WRITE_SETTINGS" />
|
||||
|
||||
<application
|
||||
android:name="com.aoleyun.os.base.BaseApplication"
|
||||
android:backupAgent="com.aoleyun.os.LauncherBackupAgent"
|
||||
android:name=".base.BaseApplication"
|
||||
android:backupAgent=".LauncherBackupAgent"
|
||||
android:fullBackupContent="@xml/backupscheme"
|
||||
android:fullBackupOnly="true"
|
||||
android:hardwareAccelerated="true"
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<!-- Intent received used to install shortcuts from other applications -->
|
||||
<receiver
|
||||
android:name="com.aoleyun.os.InstallShortcutReceiver"
|
||||
android:name=".InstallShortcutReceiver"
|
||||
android:enabled="@bool/enable_install_shortcut_api"
|
||||
android:permission="com.android.launcher.permission.INSTALL_SHORTCUT">
|
||||
<intent-filter>
|
||||
@@ -102,27 +102,41 @@
|
||||
</receiver>
|
||||
|
||||
<!-- Intent received when a session is committed -->
|
||||
<receiver android:name="com.aoleyun.os.SessionCommitReceiver">
|
||||
<receiver android:name=".SessionCommitReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.content.pm.action.SESSION_COMMITTED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- Intent received used to initialize a restored widget -->
|
||||
<receiver android:name="com.aoleyun.os.AppWidgetsRestoredReceiver">
|
||||
<receiver android:name=".AppWidgetsRestoredReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_HOST_RESTORED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".receiver.NewAppReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.INSTALL_PACKAGES">
|
||||
<intent-filter android:priority="1000">
|
||||
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED" />
|
||||
<action android:name="android.intent.action.PACKAGE_CHANGED" />
|
||||
|
||||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name="com.aoleyun.os.uioverrides.dynamicui.WallpaperManagerCompatVL$ColorExtractionService"
|
||||
android:name=".uioverrides.dynamicui.WallpaperManagerCompatVL$ColorExtractionService"
|
||||
android:exported="false"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:process=":wallpaper_chooser" />
|
||||
|
||||
<service
|
||||
android:name="com.aoleyun.os.notification.NotificationListener"
|
||||
android:name=".notification.NotificationListener"
|
||||
android:enabled="@bool/notification_dots_enabled"
|
||||
android:label="@string/notification_dots_service_title"
|
||||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
|
||||
@@ -136,7 +150,7 @@
|
||||
android:value="true" />
|
||||
|
||||
<activity
|
||||
android:name="com.aoleyun.os.dragndrop.AddItemActivity"
|
||||
android:name=".dragndrop.AddItemActivity"
|
||||
android:autoRemoveFromRecents="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:label="@string/action_add_to_workspace"
|
||||
@@ -161,7 +175,7 @@
|
||||
represent the package name.
|
||||
-->
|
||||
<provider
|
||||
android:name="com.aoleyun.os.LauncherProvider"
|
||||
android:name=".LauncherProvider"
|
||||
android:authorities="${packageName}.settings"
|
||||
android:exported="true"
|
||||
android:readPermission="${packageName}.permission.READ_SETTINGS"
|
||||
@@ -172,7 +186,7 @@
|
||||
TODO: Add proper permissions
|
||||
-->
|
||||
<provider
|
||||
android:name="com.aoleyun.os.graphics.GridOptionsProvider"
|
||||
android:name=".graphics.GridOptionsProvider"
|
||||
android:authorities="${packageName}.grid_control"
|
||||
android:enabled="false"
|
||||
android:exported="true" />
|
||||
@@ -181,7 +195,7 @@
|
||||
The settings activity. To extend point settings_fragment_name to appropriate fragment class
|
||||
-->
|
||||
<activity
|
||||
android:name="com.aoleyun.os.settings.SettingsActivity"
|
||||
android:name=".settings.SettingsActivity"
|
||||
android:autoRemoveFromRecents="true"
|
||||
android:label="@string/settings_button_text"
|
||||
android:theme="@android:style/Theme.DeviceDefault.Settings">
|
||||
@@ -192,7 +206,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.aoleyun.os.Launcher"
|
||||
android:name=".Launcher"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
@@ -215,7 +229,7 @@
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="com.aoleyun.os.testing.TestInformationProvider"
|
||||
android:name=".testing.TestInformationProvider"
|
||||
android:authorities="${packageName}.TestInfo"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
|
||||
73
build.gradle
73
build.gradle
@@ -65,8 +65,8 @@ android {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
|
||||
versionCode 151
|
||||
versionName "1.4.0628"
|
||||
versionCode 179
|
||||
versionName "1.5.0522"
|
||||
|
||||
ndk {
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
@@ -167,9 +167,78 @@ android {
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
T40Air {
|
||||
storeFile file("keystore/T40Air.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "T40Air"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
P50 {
|
||||
storeFile file("keystore/P50TD.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "P50TD"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
seewo {
|
||||
storeFile file("keystore/aiud.keystore")
|
||||
storePassword "s4HdJuphaiHhU7WY"
|
||||
keyAlias "androidreleasekey"
|
||||
keyPassword "JwUw2oV16rUjWLBC"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
seewoDebug.initWith(debug)
|
||||
seewoDebug {
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.seewo
|
||||
buildConfigField "String", "platform", '"seewo"'
|
||||
}
|
||||
|
||||
seewoRelease.initWith(release)
|
||||
seewoRelease {
|
||||
signingConfig signingConfigs.seewo
|
||||
buildConfigField "String", "platform", '"seewo"'
|
||||
}
|
||||
|
||||
P50Debug.initWith(debug)
|
||||
P50Debug {
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.P50
|
||||
buildConfigField "String", "platform", '"P50TD"'
|
||||
}
|
||||
|
||||
P50Release.initWith(release)
|
||||
P50Release {
|
||||
signingConfig signingConfigs.P50
|
||||
buildConfigField "String", "platform", '"P50TD"'
|
||||
}
|
||||
|
||||
T40AirDebug.initWith(debug)
|
||||
T40AirDebug {
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.T40Air
|
||||
buildConfigField "String", "platform", '"HL500"'
|
||||
}
|
||||
|
||||
T40AirRelease.initWith(release)
|
||||
T40AirRelease {
|
||||
signingConfig signingConfigs.T40Air
|
||||
buildConfigField "String", "platform", '"HL500"'
|
||||
}
|
||||
|
||||
// AiUduDebug.initWith(debug)
|
||||
// AiUduDebug {
|
||||
// versionNameSuffix "-debug"
|
||||
|
||||
@@ -13,6 +13,12 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
seewoDebug {}
|
||||
seewoRelease {}
|
||||
P50Debug {}
|
||||
P50Release {}
|
||||
T40AirDebug {}
|
||||
T40AirRelease {}
|
||||
AiUduDebug {}
|
||||
AiUduRelease {}
|
||||
Huaruian8768Debug {}
|
||||
|
||||
BIN
keystore/P50TD.jks
Normal file
BIN
keystore/P50TD.jks
Normal file
Binary file not shown.
BIN
keystore/T40Air.jks
Normal file
BIN
keystore/T40Air.jks
Normal file
Binary file not shown.
BIN
keystore/aiud.keystore
Normal file
BIN
keystore/aiud.keystore
Normal file
Binary file not shown.
@@ -4,6 +4,7 @@ import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
|
||||
import com.aoleyun.os.R;
|
||||
import com.aoleyun.os.model.LoaderTask;
|
||||
import com.aoleyun.os.util.ResourceBasedOverride;
|
||||
|
||||
public class AppFilter implements ResourceBasedOverride {
|
||||
@@ -13,6 +14,9 @@ public class AppFilter implements ResourceBasedOverride {
|
||||
}
|
||||
|
||||
public boolean shouldShowApp(ComponentName app) {
|
||||
if (LoaderTask.SYSTEM_HIDE_APP.contains(app.getPackageName())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,13 +41,12 @@ import android.view.accessibility.AccessibilityEvent;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.aoleyun.os.R;
|
||||
import com.aoleyun.os.anim.Interpolators;
|
||||
import com.aoleyun.os.dragndrop.DragController;
|
||||
import com.aoleyun.os.dragndrop.DragLayer;
|
||||
import com.aoleyun.os.dragndrop.DragOptions;
|
||||
import com.aoleyun.os.dragndrop.DragView;
|
||||
import com.aoleyun.os.uiuiutils.JGYUtils;
|
||||
import com.aoleyun.os.uiuiutils.JgyUtils;
|
||||
import com.aoleyun.os.userevent.nano.LauncherLogProto.Target;
|
||||
import com.aoleyun.os.util.Themes;
|
||||
import com.aoleyun.os.util.Thunk;
|
||||
@@ -249,7 +248,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
if (intent != null) {
|
||||
String pkg = intent.getComponent().getPackageName();
|
||||
Log.e("beginDrag", "beginDrag: " + pkg);
|
||||
if (JGYUtils.getInstance().isEnforceApp(pkg)) {
|
||||
if (JgyUtils.getInstance().isEnforceApp(pkg)) {
|
||||
mActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,15 +22,12 @@ import static com.aoleyun.os.userevent.nano.LauncherLogProto.ControlType.UNDO;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.aoleyun.os.R;
|
||||
import com.aoleyun.os.accessibility.LauncherAccessibilityDelegate;
|
||||
import com.aoleyun.os.dragndrop.DragOptions;
|
||||
import com.aoleyun.os.logging.LoggerUtils;
|
||||
import com.aoleyun.os.model.ModelWriter;
|
||||
import com.aoleyun.os.uiuiutils.JGYUtils;
|
||||
import com.aoleyun.os.userevent.nano.LauncherLogProto.ControlType;
|
||||
import com.aoleyun.os.userevent.nano.LauncherLogProto.Target;
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ import com.aoleyun.os.testing.TestProtocol;
|
||||
import com.aoleyun.os.touch.ItemClickHandler;
|
||||
import com.aoleyun.os.uioverrides.UiFactory;
|
||||
import com.aoleyun.os.uiuiutils.ApkUtils;
|
||||
import com.aoleyun.os.uiuiutils.JGYUtils;
|
||||
import com.aoleyun.os.uiuiutils.JgyUtils;
|
||||
import com.aoleyun.os.uiuiutils.TimeUtils;
|
||||
import com.aoleyun.os.uiuiutils.Utils;
|
||||
import com.aoleyun.os.userevent.nano.LauncherLogProto;
|
||||
@@ -470,8 +470,8 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
}
|
||||
}
|
||||
});
|
||||
JGYUtils.getInstance().wakeUpAppstore();
|
||||
JGYUtils.getInstance().wakeUpDeviceInfo();
|
||||
JgyUtils.getInstance().wakeUpAppstore();
|
||||
JgyUtils.getInstance().wakeUpDeviceInfo();
|
||||
}
|
||||
|
||||
private void SetWallPaper() {
|
||||
@@ -479,7 +479,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
//利用WallpaparManager,添加权限set_wallpaper
|
||||
WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
|
||||
try {
|
||||
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
|
||||
if ("Aiud_A8_ag_1095".equals(Build.MODEL)
|
||||
||JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform
|
||||
) {
|
||||
wallpaperManager.setBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.wallpapers_aiudu));
|
||||
}else {
|
||||
wallpaperManager.setBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.wallpapers));
|
||||
@@ -551,7 +553,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
UserHandle user = Process.myUserHandle();
|
||||
Log.i("settingssssssstemf", (add ? "Adding" : "Removing") + " package as role holder, role: "
|
||||
+ roleName + ", package: " + packageName);
|
||||
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.MTKPlatform) {
|
||||
if (JgyUtils.getInstance().checkAppPlatform() != JgyUtils.MTKPlatform) {
|
||||
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
||||
Executor executor = context.getMainExecutor();
|
||||
Consumer<Boolean> 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<BaseResponse<NewestAppUpdateResult>>() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<String> showApp = new HashSet<String>() {{
|
||||
public static final HashSet<String> SYSTEM_FORCE_APP = new HashSet<String>() {{
|
||||
// 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<String> SYSTEM_HIDE_APP = new HashSet<String>() {{
|
||||
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<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)
|
||||
// || "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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
54
src/com/aoleyun/os/receiver/NewAppReceiver.java
Normal file
54
src/com/aoleyun/os/receiver/NewAppReceiver.java
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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<String> 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user