Loading src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java +3 −9 Original line number Diff line number Diff line Loading @@ -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 (Throwable e) { return bitmap; } Drawable drawable = mPm.getUserBadgedDrawableForDensity( new BitmapDrawable(res, bitmap), info.getProfile(), badgeLocation, 0); if (drawable instanceof BitmapDrawable) { return ((BitmapDrawable) drawable).getBitmap(); Loading src/com/android/launcher3/compat/PackageInstallerCompatVL.java +2 −10 Original line number Diff line number Diff line Loading @@ -47,11 +47,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat { mResumed = false; mBound = false; // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. // This hack is just to prevent crash in older builds. try { mInstaller.registerSessionCallback(mCallback); } catch (Throwable e) { } // On start, send updates for all active sessions for (SessionInfo info : mInstaller.getAllSessions()) { Loading @@ -77,11 +73,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat { @Override public void onStop() { // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. // This hack is just to prevent crash in older builds. try { mInstaller.unregisterSessionCallback(mCallback); } catch (Throwable e) { } } @Override Loading src/com/android/launcher3/compat/UserManagerCompatVL.java +2 −14 Original line number Diff line number Diff line Loading @@ -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 (Throwable e) { return unbadged; } } @Override Loading @@ -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 (Throwable e) { return label; } } } Loading
src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java +3 −9 Original line number Diff line number Diff line Loading @@ -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 (Throwable e) { return bitmap; } Drawable drawable = mPm.getUserBadgedDrawableForDensity( new BitmapDrawable(res, bitmap), info.getProfile(), badgeLocation, 0); if (drawable instanceof BitmapDrawable) { return ((BitmapDrawable) drawable).getBitmap(); Loading
src/com/android/launcher3/compat/PackageInstallerCompatVL.java +2 −10 Original line number Diff line number Diff line Loading @@ -47,11 +47,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat { mResumed = false; mBound = false; // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. // This hack is just to prevent crash in older builds. try { mInstaller.registerSessionCallback(mCallback); } catch (Throwable e) { } // On start, send updates for all active sessions for (SessionInfo info : mInstaller.getAllSessions()) { Loading @@ -77,11 +73,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat { @Override public void onStop() { // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70. // This hack is just to prevent crash in older builds. try { mInstaller.unregisterSessionCallback(mCallback); } catch (Throwable e) { } } @Override Loading
src/com/android/launcher3/compat/UserManagerCompatVL.java +2 −14 Original line number Diff line number Diff line Loading @@ -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 (Throwable e) { return unbadged; } } @Override Loading @@ -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 (Throwable e) { return label; } } }