OSDN Git Service

merged ub-launcher3-dorval, and resolved conflicts
authorHyunyoung Song <hyunyoungs@google.com>
Fri, 5 May 2017 06:05:21 +0000 (23:05 -0700)
committerHyunyoung Song <hyunyoungs@google.com>
Wed, 10 May 2017 21:16:30 +0000 (14:16 -0700)
Bug: 36904684
Bug: 37929893
Bug: 36068989

Merged-In: I3da7113926cdcb933707b3864c4334223c11e25b
Merged-In: If9b11b212852cb1048d54db2224dab4acf2d93e0

Test: make -j 32 dist checkbuild

Change-Id: I7e12afdf66a892654a06b77f7fc625a93554d1e7

29 files changed:
1  2 
res/values-az/strings.xml
res/values-bn/strings.xml
res/values-bs/strings.xml
res/values-eu/strings.xml
res/values-gl/strings.xml
res/values-gu/strings.xml
res/values-hy/strings.xml
res/values-is/strings.xml
res/values-ka/strings.xml
res/values-kk/strings.xml
res/values-km/strings.xml
res/values-kn/strings.xml
res/values-ky/strings.xml
res/values-lo/strings.xml
res/values-mk/strings.xml
res/values-ml/strings.xml
res/values-mn/strings.xml
res/values-mr/strings.xml
res/values-my/strings.xml
res/values-ne/strings.xml
res/values-pa/strings.xml
res/values-si/strings.xml
res/values-sq/strings.xml
res/values-ta/strings.xml
res/values-te/strings.xml
res/values-ur/strings.xml
res/values-uz/strings.xml
src/com/android/launcher3/LauncherModel.java
tests/Android.mk

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -2727,47 -1671,6 +1672,47 @@@ public class LauncherModel extends Broa
              runOnMainThread(r);
          }
  
-                 final UserHandleCompat user, final List<LauncherActivityInfoCompat> apps) {
 +        private void scheduleManagedHeuristicRunnable(final ManagedProfileHeuristic heuristic,
-                                     final List<LauncherActivityInfoCompat> updatedApps =
++                final UserHandle user, final List<LauncherActivityInfo> apps) {
 +            if (heuristic != null) {
 +                // Assume the app lists now is updated.
 +                mIsManagedHeuristicAppsUpdated = false;
 +                final Runnable managedHeuristicRunnable = new Runnable() {
 +                    @Override
 +                    public void run() {
 +                        if (mIsManagedHeuristicAppsUpdated) {
 +                            // If app list is updated, we need to reschedule it otherwise old app
 +                            // list will override everything in processUserApps().
 +                            sWorker.post(new Runnable() {
 +                                public void run() {
++                                    final List<LauncherActivityInfo> updatedApps =
 +                                            mLauncherApps.getActivityList(null, user);
 +                                    scheduleManagedHeuristicRunnable(heuristic, user,
 +                                            updatedApps);
 +                                }
 +                            });
 +                        } else {
 +                            heuristic.processUserApps(apps);
 +                        }
 +                    }
 +                };
 +                runOnMainThread(new Runnable() {
 +                    @Override
 +                    public void run() {
 +                        // Check isLoadingWorkspace on the UI thread, as it is updated on the UI
 +                        // thread.
 +                        if (mIsLoadingAndBindingWorkspace) {
 +                            synchronized (mBindCompleteRunnables) {
 +                                mBindCompleteRunnables.add(managedHeuristicRunnable);
 +                            }
 +                        } else {
 +                            runOnWorkerThread(managedHeuristicRunnable);
 +                        }
 +                    }
 +                });
 +            }
 +        }
 +
          private void loadAllApps() {
              final long loadTime = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
  
                  boolean quietMode = mUserManager.isQuietModeEnabled(user);
                  // Create the ApplicationInfos
                  for (int i = 0; i < apps.size(); i++) {
-                     LauncherActivityInfoCompat app = apps.get(i);
+                     LauncherActivityInfo app = apps.get(i);
                      // This builds the icon bitmaps.
-                     mBgAllAppsList.add(new AppInfo(mContext, app, user, mIconCache, quietMode));
+                     mBgAllAppsList.add(new AppInfo(app, user, quietMode), app);
                  }
 -
                  final ManagedProfileHeuristic heuristic = ManagedProfileHeuristic.get(mContext, user);
                  if (heuristic != null) {
 -                    final Runnable r = new Runnable() {
 -
 -                        @Override
 -                        public void run() {
 -                            heuristic.processUserApps(apps);
 -                        }
 -                    };
 -                    runOnMainThread(new Runnable() {
 -
 -                        @Override
 -                        public void run() {
 -                            // Check isLoadingWorkspace on the UI thread, as it is updated on
 -                            // the UI thread.
 -                            if (mIsLoadingAndBindingWorkspace) {
 -                                synchronized (mBindCompleteRunnables) {
 -                                    mBindCompleteRunnables.add(r);
 -                                }
 -                            } else {
 -                                runOnWorkerThread(r);
 -                            }
 -                        }
 -                    });
 +                    scheduleManagedHeuristicRunnable(heuristic, user, apps);
                  }
              }
              // Huh? Shouldn't this be inside the Runnable below?
@@@ -17,11 -17,13 +17,17 @@@ LOCAL_PATH := $(call my-dir
  include $(CLEAR_VARS)
  
  LOCAL_MODULE_TAGS := tests
- LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator
 -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator mockito-target-minus-junit4
++LOCAL_STATIC_JAVA_LIBRARIES := \
++      android-support-test \
++      ub-uiautomator \
++      mockito-target-minus-junit4 \
++      legacy-android-test
  
  LOCAL_SRC_FILES := $(call all-java-files-under, src)
+ LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml
  
  LOCAL_SDK_VERSION := current
+ LOCAL_MIN_SDK_VERSION := 21
  
  LOCAL_PACKAGE_NAME := Launcher3Tests