Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8426319c authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am f20e9a88: Merge change Idf40f3b0 into eclair

Merge commit 'f20e9a88' into eclair-mr2

* commit 'f20e9a88':
  Prevent crash in Home when using widgets whose ids collide with Home's
parents 1c7be08f f20e9a88
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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;