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

Commit 2c070bae authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Re-enabling queued unbinding of services after requests to the service....

Merge "Re-enabling queued unbinding of services after requests to the service. (3394210)" into honeycomb
parents e9b644fc 16c8d8a5
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -238854,7 +238854,7 @@
>
>
</method>
</method>
<method name="onRemoteAdapterConnected"
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
 synchronized="false"
 synchronized="false"
@@ -240832,7 +240832,7 @@
>
>
</method>
</method>
<method name="onRemoteAdapterConnected"
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
 synchronized="false"
 synchronized="false"
+2 −2
Original line number Original line Diff line number Diff line
@@ -238864,7 +238864,7 @@
>
>
</method>
</method>
<method name="onRemoteAdapterConnected"
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
 synchronized="false"
 synchronized="false"
@@ -240842,7 +240842,7 @@
>
>
</method>
</method>
<method name="onRemoteAdapterConnected"
<method name="onRemoteAdapterConnected"
 return="void"
 return="boolean"
 abstract="false"
 abstract="false"
 native="false"
 native="false"
 synchronized="false"
 synchronized="false"
+4 −1
Original line number Original line 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.
     * Called back when the adapter connects to the RemoteViewsService.
     */
     */
    public void onRemoteAdapterConnected() {
    public boolean onRemoteAdapterConnected() {
        if (mRemoteAdapter != mAdapter) {
        if (mRemoteAdapter != mAdapter) {
            setAdapter(mRemoteAdapter);
            setAdapter(mRemoteAdapter);
            return false;
        } else if (mRemoteAdapter != null) {
        } else if (mRemoteAdapter != null) {
            mRemoteAdapter.superNotifyDataSetChanged();
            mRemoteAdapter.superNotifyDataSetChanged();
            return true;
        }
        }
        return false;
    }
    }


    /**
    /**
+26 −3
Original line number Original line Diff line number Diff line
@@ -53,6 +53,12 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
     */
     */
    int mWhichChild = 0;
    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
     * Whether or not the first view(s) should be animated in
     */
     */
@@ -780,8 +786,16 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
        // set mWhichChild
        // set mWhichChild
        mWhichChild = ss.whichChild;
        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);
            setDisplayedChild(mWhichChild);
        }
        }
    }


    /**
    /**
     * Shows only the specified child. The other displays Views exit the screen
     * 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.
     * Called back when the adapter connects to the RemoteViewsService.
     */
     */
    public void onRemoteAdapterConnected() {
    public boolean onRemoteAdapterConnected() {
        if (mRemoteViewsAdapter != mAdapter) {
        if (mRemoteViewsAdapter != mAdapter) {
            setAdapter(mRemoteViewsAdapter);
            setAdapter(mRemoteViewsAdapter);

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


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


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

File changed.

Preview size limit exceeded, changes collapsed.

Loading