version:4.4
fix:优化解锁后的app显示 update:
This commit is contained in:
@@ -65,8 +65,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 30
|
||||
versionName "3.9"
|
||||
versionCode 35
|
||||
versionName "4.4"
|
||||
ndk {
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
|
||||
@@ -1262,6 +1262,15 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
HTTPInterface.sendRunningApp(Launcher.this);
|
||||
JGYUtils.getInstance().wakeUpAppstore();
|
||||
JGYUtils.getInstance().wakeUpDeviceInfo();
|
||||
checkIsRest();
|
||||
}
|
||||
|
||||
private void checkIsRest() {
|
||||
int desktop_clear = Settings.Global.getInt(getContentResolver(), "desktop_clear", 0);
|
||||
if (!JGYUtils.getInstance().getDeviceIsLocked() && desktop_clear != 1) {
|
||||
Settings.Global.putInt(getContentResolver(), "desktop_clear", 1);
|
||||
JGYUtils.getInstance().cleanAoleLauncher3Cache();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeRecentTask() {
|
||||
|
||||
35
src/com/aoleyun/os/comm/JGYActions.java
Normal file
35
src/com/aoleyun/os/comm/JGYActions.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package com.aoleyun.os.comm;
|
||||
|
||||
public class JGYActions {
|
||||
|
||||
/*锁定解锁设备 后台1是锁定,底层0是锁定*/
|
||||
public final static String ACTION_QCH_UNLOCK_IPAD = "qch_unlock_ipad";
|
||||
/*后台锁定*/
|
||||
public final static int NET_CODE_LOCKED = 1;
|
||||
/*后台解锁*/
|
||||
public final static int NET_CODE_UNLOCKED = 0;
|
||||
/*底层锁定*/
|
||||
public final static int FRAME_CODE_LOCKED = 0;
|
||||
/*底层解锁*/
|
||||
public final static int FRAME_CODE_UNLOCKED = 1;
|
||||
|
||||
/*
|
||||
* 需要写到底层的数据
|
||||
* */
|
||||
|
||||
/*应用管理-允许联网*/
|
||||
public final static String ACTION_HRRECEIVER_JGY = "qch_jgy_network_allow";
|
||||
/*应用管理-禁止联网*/
|
||||
public final static String ACTION_HRRECEIVER_JGY_DIS = "qch_jgy_network_disallow";
|
||||
/*状态栏*/
|
||||
public final static String ACTION_STATUSBAR_STATUS = "jgy_statusbar_status";
|
||||
|
||||
|
||||
/*
|
||||
* 应用内部的数据
|
||||
* */
|
||||
|
||||
//后台上传所有应用包名 将添加到桌面
|
||||
// TODO: 2021/10/13
|
||||
public final static String ACTION_JGY_SHORTCUTLIST = "only_jgy_shortcut_list";
|
||||
}
|
||||
@@ -56,6 +56,7 @@ import com.aoleyun.os.LauncherModel;
|
||||
import com.aoleyun.os.LauncherSettings;
|
||||
import com.aoleyun.os.WorkspaceItemInfo;
|
||||
import com.aoleyun.os.Utilities;
|
||||
import com.aoleyun.os.comm.JGYActions;
|
||||
import com.aoleyun.os.compat.AppWidgetManagerCompat;
|
||||
import com.aoleyun.os.compat.LauncherAppsCompat;
|
||||
import com.aoleyun.os.compat.PackageInstallerCompat;
|
||||
@@ -307,15 +308,8 @@ public class LoaderTask implements Runnable {
|
||||
ContentResolver crv = context.getContentResolver();
|
||||
ArrayList<Pair<ItemInfo, Object>> installQueue = new ArrayList<>();
|
||||
final List<UserHandle> profiles = mUserManager.getUserProfiles();
|
||||
String whiteList = Settings.System.getString(crv, "only_jgy_shortcut_list");
|
||||
String whiteList = Settings.System.getString(crv, JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||
Log.e("verifyApplications", "whiteList: " + whiteList);
|
||||
int qch_unlock_ipad = Settings.System.getInt(crv, "qch_unlock_ipad", 0);
|
||||
Log.e("verifyApplications", "qch_unlock_ipad: " + qch_unlock_ipad);
|
||||
int desktop_clear = Settings.Global.getInt(crv, "desktop_clear", 0);
|
||||
if (qch_unlock_ipad == 1 && desktop_clear != 1) {
|
||||
Settings.Global.putInt(crv, "desktop_clear", 1);
|
||||
JGYUtils.getInstance().cleanAoleLauncher3Cache();
|
||||
}
|
||||
for (UserHandle user : profiles) {
|
||||
final List<LauncherActivityInfo> apps = mLauncherApps.getActivityList(null, user);
|
||||
ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo> added = new ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo>();
|
||||
@@ -326,7 +320,7 @@ public class LoaderTask implements Runnable {
|
||||
if (BuildConfig.APPLICATION_ID.equals(app.getApplicationInfo().packageName))
|
||||
continue;
|
||||
/*系统应用*/
|
||||
if (qch_unlock_ipad == 0) {
|
||||
if (JGYUtils.getInstance().getDeviceIsLocked()) {
|
||||
if ((app.getApplicationFlags() & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
if (!showApp.contains(app.getApplicationInfo().packageName)) {
|
||||
Log.e("verifyApplications", "skip1: " + app.getApplicationInfo().packageName);
|
||||
|
||||
@@ -45,6 +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.util.FlagOp;
|
||||
import com.aoleyun.os.util.IntSparseArrayMap;
|
||||
import com.aoleyun.os.util.ItemInfoMatcher;
|
||||
@@ -104,7 +105,9 @@ 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 (hideAppList.contains(packages[i])) continue;
|
||||
if (JGYUtils.getInstance().getDeviceIsLocked()) {
|
||||
if (hideAppList.contains(packages[i])) continue;
|
||||
}
|
||||
iconCache.updateIconsForPkg(packages[i], mUser);
|
||||
if (FeatureFlags.LAUNCHER3_PROMISE_APPS_IN_ALL_APPS) {
|
||||
appsList.removePackage(packages[i], Process.myUserHandle());
|
||||
@@ -326,7 +329,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
} else if (mOp == OP_UPDATE) {
|
||||
// Mark disabled packages in the broadcast to be removed
|
||||
final LauncherAppsCompat launcherApps = LauncherAppsCompat.getInstance(context);
|
||||
for (int i=0; i<N; i++) {
|
||||
for (int i = 0; i < N; i++) {
|
||||
if (!launcherApps.isPackageEnabledForProfile(packages[i], mUser)) {
|
||||
removedPackages.add(packages[i]);
|
||||
}
|
||||
@@ -364,7 +367,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
}
|
||||
|
||||
//add for load new install app on workspace
|
||||
public void updateToWorkSpace(Context context, LauncherAppState app , AllAppsList appsList){
|
||||
public void updateToWorkSpace(Context context, LauncherAppState app, AllAppsList appsList) {
|
||||
ArrayList<Pair<ItemInfo, Object>> installQueue = new ArrayList<>();
|
||||
final List<UserHandle> profiles = UserManagerCompat.getInstance(context).getUserProfiles();
|
||||
ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo> added
|
||||
@@ -375,9 +378,9 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
synchronized (this) {
|
||||
for (LauncherActivityInfo info : apps) {
|
||||
for (AppInfo appInfo : appsList.added) {
|
||||
if(info.getComponentName().equals(appInfo.componentName)){
|
||||
if (info.getComponentName().equals(appInfo.componentName)) {
|
||||
InstallShortcutReceiver.PendingInstallShortcutInfo mPendingInstallShortcutInfo
|
||||
= new InstallShortcutReceiver.PendingInstallShortcutInfo(info,context);
|
||||
= new InstallShortcutReceiver.PendingInstallShortcutInfo(info, context);
|
||||
added.add(mPendingInstallShortcutInfo);
|
||||
installQueue.add(mPendingInstallShortcutInfo.getItemInfo());
|
||||
}
|
||||
@@ -392,10 +395,11 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
|
||||
/**
|
||||
* Updates {@param si}'s intent to point to a new ComponentName.
|
||||
*
|
||||
* @return Whether the shortcut intent was changed.
|
||||
*/
|
||||
private boolean updateWorkspaceItemIntent(Context context,
|
||||
WorkspaceItemInfo si, String packageName) {
|
||||
WorkspaceItemInfo si, String packageName) {
|
||||
// Try to find the best match activity.
|
||||
Intent intent = new PackageManagerHelper(context).getAppLaunchIntent(packageName, mUser);
|
||||
if (intent != null) {
|
||||
|
||||
@@ -11,13 +11,13 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.aoleyun.os.BuildConfig;
|
||||
import com.aoleyun.os.network.NetworkManager;
|
||||
import com.aoleyun.os.network.bean.BaseResponse;
|
||||
import com.aoleyun.os.uiuiutils.APKUtils;
|
||||
import com.aoleyun.os.uiuiutils.CmdUtil;
|
||||
import com.aoleyun.os.uiuiutils.Utils;
|
||||
import com.aoleyun.os.network.bean.BaseResponse;
|
||||
import com.aoleyun.os.network.NetworkManager;
|
||||
import com.aoleyun.os.uiuiutils.ForegroundAppUtil;
|
||||
import com.aoleyun.os.uiuiutils.TimeUtils;
|
||||
import com.aoleyun.os.uiuiutils.Utils;
|
||||
import com.arialyy.annotations.Download;
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.arialyy.aria.core.task.DownloadTask;
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.util.Log;
|
||||
|
||||
import com.android.server.BootReceiver;
|
||||
import com.aoleyun.os.BuildConfig;
|
||||
import com.aoleyun.os.comm.JGYActions;
|
||||
import com.aoleyun.os.model.LoaderTask;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -184,6 +185,10 @@ public class JGYUtils {
|
||||
return appSet.contains(pkg);
|
||||
}
|
||||
|
||||
public boolean getDeviceIsLocked() {
|
||||
int locked = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
return locked == JGYActions.FRAME_CODE_LOCKED;
|
||||
}
|
||||
|
||||
|
||||
public static final String PACKAGE_DEVICEINFO = "com.aoleyun.sn";
|
||||
|
||||
Reference in New Issue
Block a user