去掉抽屉,去掉取消按钮
This commit is contained in:
@@ -38,6 +38,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.LongSparseArray;
|
||||
import android.util.MutableInt;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.android.uiuios.AllAppsList;
|
||||
import com.android.uiuios.AppInfo;
|
||||
@@ -187,6 +188,8 @@ public class LoaderTask implements Runnable {
|
||||
TraceHelper.partitionSection(TAG, "step 2.1: loading all apps");
|
||||
List<LauncherActivityInfo> allActivityList = loadAllApps();
|
||||
|
||||
verifyApplications();
|
||||
|
||||
TraceHelper.partitionSection(TAG, "step 2.2: Binding all apps");
|
||||
verifyNotStopped();
|
||||
mResults.bindAllApps();
|
||||
@@ -242,6 +245,27 @@ public class LoaderTask implements Runnable {
|
||||
TraceHelper.endSection(TAG);
|
||||
}
|
||||
|
||||
//add for load all app on workspace
|
||||
private void verifyApplications() {
|
||||
final Context context = mApp.getContext();
|
||||
ArrayList<Pair<ItemInfo, Object>> installQueue = new ArrayList<>();
|
||||
final List<UserHandle> profiles = mUserManager.getUserProfiles();
|
||||
for (UserHandle user : profiles) {
|
||||
final List<LauncherActivityInfo> apps = mLauncherApps.getActivityList(null, user);
|
||||
ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo> added = new ArrayList<InstallShortcutReceiver.PendingInstallShortcutInfo>();
|
||||
synchronized (this) {
|
||||
for (LauncherActivityInfo app : apps) {
|
||||
InstallShortcutReceiver.PendingInstallShortcutInfo pendingInstallShortcutInfo = new InstallShortcutReceiver.PendingInstallShortcutInfo(app, context);
|
||||
added.add(pendingInstallShortcutInfo);
|
||||
installQueue.add(pendingInstallShortcutInfo.getItemInfo());
|
||||
}
|
||||
}
|
||||
if (!added.isEmpty()) {
|
||||
mApp.getModel().addAndBindAddedWorkspaceItems(installQueue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void stopLocked() {
|
||||
mStopped = true;
|
||||
this.notify();
|
||||
|
||||
Reference in New Issue
Block a user