version:2.2
fix:修复应用从第一屏开始排列 add:
This commit is contained in:
@@ -27,6 +27,7 @@ import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.LauncherActivityInfo;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageInstaller.SessionInfo;
|
||||
@@ -250,7 +251,7 @@ public class LoaderTask implements Runnable {
|
||||
/**
|
||||
* 需要隐藏的图标
|
||||
*/
|
||||
private List<String> hideApp = new ArrayList<String>() {{
|
||||
private HashSet<String> hideApp = new HashSet<String>() {{
|
||||
this.add(BuildConfig.APPLICATION_ID);
|
||||
this.add("com.android.quicksearchbox");
|
||||
this.add("com.st.nfc.dta.mobile");
|
||||
@@ -260,6 +261,36 @@ public class LoaderTask implements Runnable {
|
||||
this.add("com.android.email");
|
||||
}};
|
||||
|
||||
public static HashSet<String> showApp = new HashSet<String>() {{
|
||||
// this.add(BuildConfig.APPLICATION_ID);
|
||||
//aoleyun
|
||||
this.add("com.aoleyun.sn");
|
||||
this.add("com.aoleyun.appstore");
|
||||
this.add("com.aoleyun.postern");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.file");
|
||||
this.add("com.aoleyun.reos");
|
||||
this.add("com.aoleyunos.dop1");
|
||||
this.add("com.aoleyunos.dop2");
|
||||
//system
|
||||
this.add("com.android.documentsui");
|
||||
this.add("com.android.messaging");
|
||||
this.add("com.android.music");
|
||||
this.add("com.android.camera");
|
||||
this.add("com.android.camera2");
|
||||
this.add("com.android.settings");
|
||||
this.add("com.android.stk");
|
||||
this.add("com.mediatek.camera");
|
||||
this.add("com.mediatek.filemanager");
|
||||
//uiui
|
||||
this.add("com.calculator.uiui");
|
||||
this.add("com.notepad.uiui");
|
||||
this.add("com.calendar.uiui");
|
||||
this.add("com.alarmclock.uiui");
|
||||
this.add("com.uiui.videoplayer");
|
||||
}};
|
||||
|
||||
//add for load all app on workspace
|
||||
private void verifyApplications() {
|
||||
final Context context = mApp.getContext();
|
||||
@@ -270,8 +301,11 @@ public class LoaderTask implements Runnable {
|
||||
ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo> added = new ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo>();
|
||||
synchronized (this) {
|
||||
for (LauncherActivityInfo app : apps) {
|
||||
if (hideApp.contains(app.getApplicationInfo().packageName)) {
|
||||
continue;
|
||||
/*系统应用*/
|
||||
if ((app.getApplicationFlags() & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
if (!showApp.contains(app.getApplicationInfo().packageName)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
InstallShortcutReceiver.PendingInstallShortcutInfo pendingInstallShortcutInfo = new InstallShortcutReceiver.PendingInstallShortcutInfo(app, context);
|
||||
added.add(pendingInstallShortcutInfo);
|
||||
|
||||
Reference in New Issue
Block a user