Merge "Remove STOPSHIPs from GSA 4.0" into ub-now-porkchop
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc4e84ee3b
@@ -121,15 +121,9 @@ class AppWidgetManagerCompatVL extends AppWidgetManagerCompat {
|
|||||||
} else {
|
} else {
|
||||||
badgeLocation.offset(bitmap.getWidth() - badgeSize - badgeMargin, top);
|
badgeLocation.offset(bitmap.getWidth() - badgeSize - badgeMargin, top);
|
||||||
}
|
}
|
||||||
Drawable drawable = null;
|
|
||||||
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
Drawable drawable = mPm.getUserBadgedDrawableForDensity(
|
||||||
// This hack is just to prevent crash in older builds.
|
new BitmapDrawable(res, bitmap), info.getProfile(), badgeLocation, 0);
|
||||||
try {
|
|
||||||
drawable = mPm.getUserBadgedDrawableForDensity(new BitmapDrawable(res, bitmap),
|
|
||||||
info.getProfile(), badgeLocation, 0);
|
|
||||||
} catch (Throwable e) {
|
|
||||||
return bitmap;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (drawable instanceof BitmapDrawable) {
|
if (drawable instanceof BitmapDrawable) {
|
||||||
return ((BitmapDrawable) drawable).getBitmap();
|
return ((BitmapDrawable) drawable).getBitmap();
|
||||||
|
|||||||
@@ -47,11 +47,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
|
|||||||
mResumed = false;
|
mResumed = false;
|
||||||
mBound = false;
|
mBound = false;
|
||||||
|
|
||||||
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
mInstaller.registerSessionCallback(mCallback);
|
||||||
// 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
|
// On start, send updates for all active sessions
|
||||||
for (SessionInfo info : mInstaller.getAllSessions()) {
|
for (SessionInfo info : mInstaller.getAllSessions()) {
|
||||||
@@ -77,11 +73,7 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
mInstaller.unregisterSessionCallback(mCallback);
|
||||||
// This hack is just to prevent crash in older builds.
|
|
||||||
try {
|
|
||||||
mInstaller.unregisterSessionCallback(mCallback);
|
|
||||||
} catch (Throwable e) { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -51,13 +51,7 @@ public class UserManagerCompatVL extends UserManagerCompatV17 {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) {
|
public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) {
|
||||||
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
return mPm.getUserBadgedIcon(unbadged, user.getUser());
|
||||||
// This hack is just to prevent crash in older builds.
|
|
||||||
try {
|
|
||||||
return mPm.getUserBadgedIcon(unbadged, user.getUser());
|
|
||||||
} catch (Throwable e) {
|
|
||||||
return unbadged;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -65,13 +59,7 @@ public class UserManagerCompatVL extends UserManagerCompatV17 {
|
|||||||
if (user == null) {
|
if (user == null) {
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
return mPm.getUserBadgedLabel(label, user.getUser());
|
||||||
// This hack is just to prevent crash in older builds.
|
|
||||||
try {
|
|
||||||
return mPm.getUserBadgedLabel(label, user.getUser());
|
|
||||||
} catch (Throwable e) {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user