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

Commit 38fe6ff4 authored by Winson Chung's avatar Winson Chung Committed by Android Git Automerger
Browse files

am 2c070bae: Merge "Re-enabling queued unbinding of services after requests to...

am 2c070bae: Merge "Re-enabling queued unbinding of services after requests to the service. (3394210)" into honeycomb

* commit '2c070bae':
  Re-enabling queued unbinding of services after requests to the service. (3394210)
parents 48f73779 2c070bae
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -238854,7 +238854,7 @@
>
</method>
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
@@ -240832,7 +240832,7 @@
>
</method>
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
+2 −2
Original line number Diff line number Diff line
@@ -240229,7 +240229,7 @@
>
</method>
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
@@ -242207,7 +242207,7 @@
>
</method>
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
+4 −1
Original line number Diff line number Diff line
@@ -5289,12 +5289,15 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Called back when the adapter connects to the RemoteViewsService.
     */
    public void onRemoteAdapterConnected() {
    public boolean onRemoteAdapterConnected() {
        if (mRemoteAdapter != mAdapter) {
            setAdapter(mRemoteAdapter);
            return false;
        } else if (mRemoteAdapter != null) {
            mRemoteAdapter.superNotifyDataSetChanged();
            return true;
        }
        return false;
    }

    /**
+26 −3
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
     */
    int mWhichChild = 0;

    /**
     * The index of the child to restore after the asynchronous connection from the
     * RemoteViewsAdapter has been.
     */
    private int mRestoreWhichChild = -1;

    /**
     * Whether or not the first view(s) should be animated in
     */
@@ -780,8 +786,16 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
        // set mWhichChild
        mWhichChild = ss.whichChild;

        // When using RemoteAdapters, the async connection process can lead to
        // onRestoreInstanceState to be called before setAdapter(), so we need to save the previous
        // values to restore the list position after we connect, and can skip setting the displayed
        // child until then.
        if (mRemoteViewsAdapter != null && mAdapter == null) {
            mRestoreWhichChild = mWhichChild;
        } else {
            setDisplayedChild(mWhichChild);
        }
    }

    /**
     * Shows only the specified child. The other displays Views exit the screen
@@ -957,12 +971,21 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
    /**
     * Called back when the adapter connects to the RemoteViewsService.
     */
    public void onRemoteAdapterConnected() {
    public boolean onRemoteAdapterConnected() {
        if (mRemoteViewsAdapter != mAdapter) {
            setAdapter(mRemoteViewsAdapter);

            // Restore the previous position (see onRestoreInstanceState)
            if (mRestoreWhichChild > -1) {
                setDisplayedChild(mRestoreWhichChild);
                mRestoreWhichChild = -1;
            }
            return false;
        } else if (mRemoteViewsAdapter != null) {
            mRemoteViewsAdapter.superNotifyDataSetChanged();
            return true;
        }
        return false;
    }

    /**
@@ -995,7 +1018,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>

    @Override
    protected void onDetachedFromWindow() {
        mAdapter = null;
        setAdapter(null);
        super.onDetachedFromWindow();
    }
}
+306 −197

File changed.

Preview size limit exceeded, changes collapsed.

Loading