version:4.4

fix:优化解锁后的app显示
update:
This commit is contained in:
2022-04-20 16:02:43 +08:00
parent 9f6c360a9a
commit 7903e3c21b
7 changed files with 67 additions and 20 deletions

View File

@@ -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);