diff options
24 files changed, 38 insertions, 41 deletions
diff --git a/res/drawable-hdpi/screenpanel.9.png b/res/drawable-hdpi/screenpanel.9.png Binary files differindex eed0f2cbb..bf806c3ec 100644 --- a/res/drawable-hdpi/screenpanel.9.png +++ b/res/drawable-hdpi/screenpanel.9.png diff --git a/res/drawable-hdpi/screenpanel_hover.9.png b/res/drawable-hdpi/screenpanel_hover.9.png Binary files differindex 2cea8a471..172683754 100644 --- a/res/drawable-hdpi/screenpanel_hover.9.png +++ b/res/drawable-hdpi/screenpanel_hover.9.png diff --git a/res/drawable-mdpi/screenpanel.9.png b/res/drawable-mdpi/screenpanel.9.png Binary files differindex 6f8b7e6a1..a9bed9f48 100644 --- a/res/drawable-mdpi/screenpanel.9.png +++ b/res/drawable-mdpi/screenpanel.9.png diff --git a/res/drawable-mdpi/screenpanel_hover.9.png b/res/drawable-mdpi/screenpanel_hover.9.png Binary files differindex 8a94984f5..ce1219798 100644 --- a/res/drawable-mdpi/screenpanel_hover.9.png +++ b/res/drawable-mdpi/screenpanel_hover.9.png diff --git a/res/drawable-xhdpi/screenpanel.9.png b/res/drawable-xhdpi/screenpanel.9.png Binary files differindex 2d70d7af5..fe604ba36 100644 --- a/res/drawable-xhdpi/screenpanel.9.png +++ b/res/drawable-xhdpi/screenpanel.9.png diff --git a/res/drawable-xhdpi/screenpanel_hover.9.png b/res/drawable-xhdpi/screenpanel_hover.9.png Binary files differindex 0032fff4d..3c05dc5d5 100644 --- a/res/drawable-xhdpi/screenpanel_hover.9.png +++ b/res/drawable-xhdpi/screenpanel_hover.9.png diff --git a/res/drawable-xxhdpi/screenpanel.9.png b/res/drawable-xxhdpi/screenpanel.9.png Binary files differindex 7ed058efa..2769bddb8 100644 --- a/res/drawable-xxhdpi/screenpanel.9.png +++ b/res/drawable-xxhdpi/screenpanel.9.png diff --git a/res/drawable-xxhdpi/screenpanel_hover.9.png b/res/drawable-xxhdpi/screenpanel_hover.9.png Binary files differindex 24d2266a0..e36d293de 100644 --- a/res/drawable-xxhdpi/screenpanel_hover.9.png +++ b/res/drawable-xxhdpi/screenpanel_hover.9.png diff --git a/res/layout-land/migration_cling.xml b/res/layout-land/migration_cling.xml index 4765524f3..307cba8a8 100644 --- a/res/layout-land/migration_cling.xml +++ b/res/layout-land/migration_cling.xml @@ -41,8 +41,9 @@ </FrameLayout> <LinearLayout - android:layout_width="280dp" + android:layout_width="@dimen/cling_migration_content_width" android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/cling_migration_content_margin" android:orientation="vertical" android:paddingLeft="24dp" android:paddingRight="24dp" > diff --git a/res/layout-port/migration_cling.xml b/res/layout-port/migration_cling.xml index 932a9f4dd..dde8dbcdb 100644 --- a/res/layout-port/migration_cling.xml +++ b/res/layout-port/migration_cling.xml @@ -42,9 +42,10 @@ android:src="@drawable/ic_migration" /> <LinearLayout - android:layout_width="280dp" + android:layout_width="@dimen/cling_migration_content_width" android:layout_height="wrap_content" android:layout_below="@+id/ic_cling_migration" + android:layout_marginStart="@dimen/cling_migration_content_margin" android:orientation="vertical" android:paddingLeft="24dp" android:paddingRight="24dp" > diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml index 68f476dc5..28679be2e 100644 --- a/res/values-sw600dp/dimens.xml +++ b/res/values-sw600dp/dimens.xml @@ -29,5 +29,7 @@ <dimen name="cling_migration_logo_width">274dp</dimen> <dimen name="cling_migration_bg_size">600dp</dimen> <dimen name="cling_migration_bg_shift">-300dp</dimen> + <dimen name="cling_migration_content_margin">64dp</dimen> + <dimen name="cling_migration_content_width">280dp</dimen> </resources> diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml index 9ae155b3c..8be996474 100644 --- a/res/values-sw720dp/dimens.xml +++ b/res/values-sw720dp/dimens.xml @@ -25,4 +25,9 @@ the drag view should be offset from the position of the original view. --> <dimen name="dragViewOffsetX">0dp</dimen> <dimen name="dragViewOffsetY">0dp</dimen> + +<!-- Cling --> + <dimen name="cling_migration_content_margin">96dp</dimen> + <dimen name="cling_migration_content_width">320dp</dimen> + </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index befaf375a..2c9e689c6 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -33,6 +33,8 @@ <dimen name="cling_migration_logo_width">165dp</dimen> <dimen name="cling_migration_bg_size">400dp</dimen> <dimen name="cling_migration_bg_shift">-200dp</dimen> + <dimen name="cling_migration_content_margin">16dp</dimen> + <dimen name="cling_migration_content_width">280dp</dimen> <!-- Workspace --> <dimen name="workspace_max_gap">16dp</dimen> diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index d0b3f4376..0ff1ef4ad 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -959,10 +959,7 @@ public class CellLayout extends ViewGroup { } public void setShortcutAndWidgetAlpha(float alpha) { - final int childCount = getChildCount(); - for (int i = 0; i < childCount; i++) { - getChildAt(i).setAlpha(alpha); - } + mShortcutsAndWidgets.setAlpha(alpha); } public ShortcutAndWidgetContainer getShortcutsAndWidgets() { diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index 75be83638..ddc1bd949 100644 --- a/src/com/android/launcher3/IconCache.java +++ b/src/com/android/launcher3/IconCache.java @@ -62,7 +62,7 @@ public class IconCache { // Empty class name is used for storing package default entry. private static final String EMPTY_CLASS_NAME = "."; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private static class CacheEntry { public Bitmap icon; @@ -511,7 +511,7 @@ public class IconCache { Log.w(TAG, "failed to decode pre-load icon for " + key); } } catch (FileNotFoundException e) { - if (DEBUG) Log.d(TAG, "there is no restored icon for: " + key, e); + if (DEBUG) Log.d(TAG, "there is no restored icon for: " + key); } catch (IOException e) { Log.w(TAG, "failed to read pre-load icon for: " + key, e); } finally { diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java index 2657b6e65..b6144f4ac 100644 --- a/src/com/android/launcher3/LauncherAppState.java +++ b/src/com/android/launcher3/LauncherAppState.java @@ -38,7 +38,7 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks { private static final String TAG = "LauncherAppState"; private static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs"; - private static final boolean DEBUG = true; // STOPSHIP(cwren) temporary for debugging + private static final boolean DEBUG = false; private final AppFilter mAppFilter; private final BuildInfo mBuildInfo; diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 616e5366c..29cd9e36a 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -85,7 +85,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class LauncherModel extends BroadcastReceiver implements LauncherAppsCompat.OnAppsChangedCallbackCompat { static final boolean DEBUG_LOADERS = false; - private static final boolean DEBUG_RECEIVER = true; // STOPSHIP(cwren) temporary for debugging + private static final boolean DEBUG_RECEIVER = false; static final String TAG = "Launcher.Model"; diff --git a/src/com/android/launcher3/compat/AppWidgetManagerCompat.java b/src/com/android/launcher3/compat/AppWidgetManagerCompat.java index 57fac7f8f..5997e7b03 100644 --- a/src/com/android/launcher3/compat/AppWidgetManagerCompat.java +++ b/src/com/android/launcher3/compat/AppWidgetManagerCompat.java @@ -41,9 +41,9 @@ public abstract class AppWidgetManagerCompat { // TODO change this to use api version once L gets an API number. if (sInstance == null) { if (Utilities.isLmp()) { - sInstance = new AppWidgetManagerCompatVL(context); + sInstance = new AppWidgetManagerCompatVL(context.getApplicationContext()); } else { - sInstance = new AppWidgetManagerCompatV16(context); + sInstance = new AppWidgetManagerCompatV16(context.getApplicationContext()); } } return sInstance; diff --git a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java index 30af38ef9..c3853ab62 100644 --- a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java +++ b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java @@ -121,15 +121,9 @@ class AppWidgetManagerCompatVL extends AppWidgetManagerCompat { } else { badgeLocation.offset(bitmap.getWidth() - badgeSize - badgeMargin, top); } - Drawable drawable = null; - // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. - // This hack is just to prevent crash in older builds. - try { - drawable = mPm.getUserBadgedDrawableForDensity(new BitmapDrawable(res, bitmap), - info.getProfile(), badgeLocation, 0); - } catch (Exception e) { - return bitmap; - } + + Drawable drawable = mPm.getUserBadgedDrawableForDensity( + new BitmapDrawable(res, bitmap), info.getProfile(), badgeLocation, 0); if (drawable instanceof BitmapDrawable) { return ((BitmapDrawable) drawable).getBitmap(); diff --git a/src/com/android/launcher3/compat/LauncherAppsCompat.java b/src/com/android/launcher3/compat/LauncherAppsCompat.java index de8c669e7..e3879eed0 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompat.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompat.java @@ -51,9 +51,9 @@ public abstract class LauncherAppsCompat { // STOPSHIP(kennyguy) change this to use api version once L gets an API number. if (sInstance == null) { if ("L".equals(Build.VERSION.CODENAME)) { - sInstance = new LauncherAppsCompatVL(context); + sInstance = new LauncherAppsCompatVL(context.getApplicationContext()); } else { - sInstance = new LauncherAppsCompatV16(context); + sInstance = new LauncherAppsCompatV16(context.getApplicationContext()); } } return sInstance; diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatV16.java b/src/com/android/launcher3/compat/LauncherAppsCompatV16.java index c47f223f3..7e5e6bf2c 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompatV16.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompatV16.java @@ -22,19 +22,17 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ActivityInfo; +import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; -import android.content.pm.PackageInfo; import android.content.pm.ResolveInfo; import android.graphics.Rect; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.os.UserHandle; import android.provider.Settings; import java.util.ArrayList; -import java.util.Collections; import java.util.List; /** diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java index 6422551ba..c4a97836c 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java @@ -82,7 +82,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat { synchronized (mCallbacks) { mCallbacks.put(callback, wrappedCallback); } - mLauncherApps.addCallback(wrappedCallback); + try { + mLauncherApps.registerCallback(wrappedCallback); + } catch (Throwable e) { + // STOPSHIP(kennyguy): Remove when LRW71 hits googlefood + } } public void removeOnAppsChangedCallback( @@ -92,7 +96,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat { wrappedCallback = mCallbacks.remove(callback); } if (wrappedCallback != null) { - mLauncherApps.removeCallback(wrappedCallback); + try { + mLauncherApps.unregisterCallback(wrappedCallback); + } catch (Throwable e) { + // STOPSHIP(kennyguy): Remove when LRW71 hits googlefood + } } } diff --git a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java index 0a842808d..4ad10d870 100644 --- a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java +++ b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java @@ -48,6 +48,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat { mBound = false; mInstaller.registerSessionCallback(mCallback); + // On start, send updates for all active sessions for (SessionInfo info : mInstaller.getAllSessions()) { mPendingReplays.append(info.getSessionId(), info); diff --git a/src/com/android/launcher3/compat/UserManagerCompatVL.java b/src/com/android/launcher3/compat/UserManagerCompatVL.java index e54db617e..19eeabdcf 100644 --- a/src/com/android/launcher3/compat/UserManagerCompatVL.java +++ b/src/com/android/launcher3/compat/UserManagerCompatVL.java @@ -51,13 +51,7 @@ public class UserManagerCompatVL extends UserManagerCompatV17 { @Override public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) { - // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. - // This hack is just to prevent crash in older builds. - try { - return mPm.getUserBadgedIcon(unbadged, user.getUser()); - } catch (Exception e) { - return unbadged; - } + return mPm.getUserBadgedIcon(unbadged, user.getUser()); } @Override @@ -65,13 +59,7 @@ public class UserManagerCompatVL extends UserManagerCompatV17 { if (user == null) { return label; } - // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. - // This hack is just to prevent crash in older builds. - try { return mPm.getUserBadgedLabel(label, user.getUser()); - } catch (Exception e) { - return label; - } } } |