Merge commit '8426319c5a5f4b6b7a1d5940e78d3fc717c36d98' into eclair-mr2-plus-aosp * commit '8426319c5a5f4b6b7a1d5940e78d3fc717c36d98': Prevent crash in Home when using widgets whose ids collide with Home's
This commit is contained in:
@ -123,8 +123,15 @@ public class AppWidgetHostView extends FrameLayout {
|
||||
|
||||
@Override
|
||||
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
|
||||
ParcelableSparseArray jail = (ParcelableSparseArray) container.get(generateId());
|
||||
final Parcelable parcelable = container.get(generateId());
|
||||
|
||||
ParcelableSparseArray jail = null;
|
||||
if (parcelable != null && parcelable instanceof ParcelableSparseArray) {
|
||||
jail = (ParcelableSparseArray) parcelable;
|
||||
}
|
||||
|
||||
if (jail == null) jail = new ParcelableSparseArray();
|
||||
|
||||
super.dispatchRestoreInstanceState(jail);
|
||||
}
|
||||
|
||||
@ -140,7 +147,7 @@ public class AppWidgetHostView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* Process a set of {@link RemoteViews} coming in as an update from the
|
||||
* AppWidget provider. Will animate into these new views as needed.
|
||||
* AppWidget provider. Will animate into these new views as needed
|
||||
*/
|
||||
public void updateAppWidget(RemoteViews remoteViews) {
|
||||
if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld);
|
||||
|
@ -118,6 +118,8 @@ FramebufferNativeWindow::FramebufferNativeWindow()
|
||||
LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
|
||||
fbDev->width, fbDev->height, strerror(-err));
|
||||
|
||||
LOGE("xDpi %d", fbDev->xdpi);
|
||||
LOGE("yDpi %d", fbDev->ydpi);
|
||||
const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags;
|
||||
const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
|
||||
const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
|
||||
|
Reference in New Issue
Block a user