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

Commit 707f498b authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

Merge commit 'remotes/goog/donut' into donut-release

parents 7c32d677 eb1eab12
Loading
Loading
Loading
Loading
+110 −0
Original line number Diff line number Diff line
@@ -23732,6 +23732,50 @@
 visibility="public"
>
</field>
<field name="EXTRA_DATA_KEY"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;intent_extra_data_key&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="INTENT_ACTION_SEARCHABLES_CHANGED"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.search.action.SEARCHABLES_CHANGED&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="INTENT_ACTION_SEARCH_SETTINGS_CHANGED"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.search.action.SETTINGS_CHANGED&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="INTENT_ACTION_WEB_SEARCH_SETTINGS"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.search.action.WEB_SEARCH_SETTINGS&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MENU_KEY"
 type="char"
 transient="false"
@@ -23765,6 +23809,17 @@
 visibility="public"
>
</field>
<field name="SHORTCUT_MIME_TYPE"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;vnd.android.cursor.item/vnd.android.search.suggest&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_FORMAT"
 type="java.lang.String"
 transient="false"
@@ -23831,6 +23886,17 @@
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_INTENT_EXTRA_DATA"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;suggest_intent_extra_data&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_QUERY"
 type="java.lang.String"
 transient="false"
@@ -23842,6 +23908,28 @@
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_SHORTCUT_ID"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;suggest_shortcut_id&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;suggest_spinner_while_refreshing&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SUGGEST_COLUMN_TEXT_1"
 type="java.lang.String"
 transient="false"
@@ -23875,6 +23963,17 @@
 visibility="public"
>
</field>
<field name="SUGGEST_NEVER_MAKE_SHORTCUT"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;_-1&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SUGGEST_URI_PATH_QUERY"
 type="java.lang.String"
 transient="false"
@@ -23886,6 +23985,17 @@
 visibility="public"
>
</field>
<field name="SUGGEST_URI_PATH_SHORTCUT"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;search_suggest_shortcut&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="USER_QUERY"
 type="java.lang.String"
 transient="false"
+1 −0
Original line number Diff line number Diff line
@@ -37,4 +37,5 @@ interface ISearchManager {
            ISearchManagerCallback searchManagerCallback,
            int ident);
    void stopSearch();
    boolean isVisible();
}
+15 −8
Original line number Diff line number Diff line
@@ -354,7 +354,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
            }
            show();
        }

        updateUI();
        
        return true;
@@ -490,6 +489,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
     */
    private void updateUI() {
        if (mSearchable != null) {
            mDecor.setVisibility(View.VISIBLE);
            updateSearchAutoComplete();
            updateSearchButton();
            updateSearchAppIcon();
@@ -994,7 +994,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
    };

    @Override
    public void dismiss() {
    public void hide() {
        if (!isShowing()) return;

        // We made sure the IME was displayed, so also make sure it is closed
@@ -1006,7 +1006,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
                    getWindow().getDecorView().getWindowToken(), 0);
        }

        super.dismiss();
        super.hide();
    }

    /**
@@ -1234,8 +1234,8 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
    }

    /**
     * Launches an intent and dismisses the search dialog (unless the intent
     * is one of the special intents that modifies the state of the search dialog).
     * Launches an intent, including any special intent handling.  Doesn't dismiss the dialog
     * since that will be handled in {@link SearchDialogWrapper#performActivityResuming}
     */
    private void launchIntent(Intent intent) {
        if (intent == null) {
@@ -1244,8 +1244,15 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        if (handleSpecialIntent(intent)){
            return;
        }
        dismiss();
        Log.d(LOG_TAG, "launching " + intent);
        getContext().startActivity(intent);

        // in global search mode, SearchDialogWrapper#performActivityResuming will handle hiding
        // the dialog when the next activity starts, but for in-app search, we still need to
        // dismiss the dialog.
        if (!mGlobalSearchMode) {
            dismiss();
        }
    }
    
    /**
+17 −33
Original line number Diff line number Diff line
@@ -1188,8 +1188,6 @@ public class SearchManager
    /**
     * Intent extra data key: This key will be used for the extra populated by the
     * {@link #SUGGEST_COLUMN_INTENT_EXTRA_DATA} column.
     *
     * {@hide}
     */
    public final static String EXTRA_DATA_KEY = "intent_extra_data_key";

@@ -1269,16 +1267,12 @@ public class SearchManager
     * result indicates the shortcut refers to a no longer valid sugggestion.
     *
     * @see #SUGGEST_COLUMN_SHORTCUT_ID
     * 
     * @hide pending API council approval
     */
    public final static String SUGGEST_URI_PATH_SHORTCUT = "search_suggest_shortcut";
    
    /**
     * MIME type for shortcut validation.  You'll use this in your suggestions content provider
     * in the getType() function.
     *
     * @hide pending API council approval
     */
    public final static String SHORTCUT_MIME_TYPE = 
            "vnd.android.cursor.item/vnd.android.search.suggest";
@@ -1389,9 +1383,7 @@ public class SearchManager
     * this element exists at the given row, this is the data that will be used when
     * forming the suggestion's intent. If not provided, the Intent's extra data field will be null.
     * This column allows suggestions to provide additional arbitrary data which will be included as
     * an extra under the key EXTRA_DATA_KEY.
     *
     * @hide Pending API council approval.
     * an extra under the key {@link #EXTRA_DATA_KEY}.
     */
    public final static String SUGGEST_COLUMN_INTENT_EXTRA_DATA = "suggest_intent_extra_data";
    /**
@@ -1425,8 +1417,6 @@ public class SearchManager
     * {@link #SUGGEST_NEVER_MAKE_SHORTCUT}, the result will not be stored as a shortcut.
     * Otherwise, the shortcut id will be used to check back for validation via
     * {@link #SUGGEST_URI_PATH_SHORTCUT}.
     *
     * @hide Pending API council approval.
     */
    public final static String SUGGEST_COLUMN_SHORTCUT_ID = "suggest_shortcut_id";

@@ -1443,8 +1433,6 @@ public class SearchManager
     * Column name for suggestions cursor. <i>Optional.</i> This column is used to specify
     * that a spinner should be shown in lieu of an icon2 while the shortcut of this suggestion
     * is being refreshed.
     * 
     * @hide Pending API council approval.
     */
    public final static String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING =
            "suggest_spinner_while_refreshing";
@@ -1452,8 +1440,6 @@ public class SearchManager
    /**
     * Column value for suggestion column {@link #SUGGEST_COLUMN_SHORTCUT_ID} when a suggestion
     * should not be stored as a shortcut in global search.
     *
     * @hide Pending API council approval.
     */
    public final static String SUGGEST_NEVER_MAKE_SHORTCUT = "_-1";

@@ -1500,8 +1486,6 @@ public class SearchManager
     * Intent action for starting a web search provider's settings activity.
     * Web search providers should handle this intent if they have provider-specific
     * settings to implement.
     * 
     * @hide Pending API council approval.
     */
    public final static String INTENT_ACTION_WEB_SEARCH_SETTINGS
            = "android.search.action.WEB_SEARCH_SETTINGS";
@@ -1510,12 +1494,18 @@ public class SearchManager
     * Intent action broadcasted to inform that the searchables list or default have changed.
     * Components should handle this intent if they cache any searchable data and wish to stay
     * up to date on changes.
     *
     * @hide Pending API council approval.
     */
    public final static String INTENT_ACTION_SEARCHABLES_CHANGED
            = "android.search.action.SEARCHABLES_CHANGED";
    
    /**
     * Intent action broadcasted to inform that the search settings have changed in some way.
     * Either searchables have been enabled or disabled, or a different web search provider
     * has been chosen.
     */
    public final static String INTENT_ACTION_SEARCH_SETTINGS_CHANGED
            = "android.search.action.SETTINGS_CHANGED";

    /**
     * If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION},
     * the search dialog will take no action.
@@ -1534,7 +1524,6 @@ public class SearchManager
    private int mIdent;
    
    // package private since they are used by the inner class SearchManagerCallback
    /* package */ boolean mIsShowing = false;
    /* package */ final Handler mHandler;
    /* package */ OnDismissListener mDismissListener = null;
    /* package */ OnCancelListener mCancelListener = null;
@@ -1600,12 +1589,9 @@ public class SearchManager
                            ComponentName launchActivity,
                            Bundle appSearchData,
                            boolean globalSearch) {
        if (DBG) debug("startSearch(), mIsShowing=" + mIsShowing);
        if (mIsShowing) return;
        if (mIdent == 0) throw new IllegalArgumentException(
                "Called from outside of an Activity context");
        try {
            mIsShowing = true;
            // activate the search manager and start it up!
            mService.startSearch(initialQuery, selectInitialQuery, launchActivity, appSearchData,
                    globalSearch, mSearchManagerCallback, mIdent);
@@ -1626,15 +1612,10 @@ public class SearchManager
     * @see #startSearch
     */
    public void stopSearch() {
        if (DBG) debug("stopSearch(), mIsShowing=" + mIsShowing);
        if (!mIsShowing) return;
        if (DBG) debug("stopSearch()");
        try {
            mService.stopSearch();
            // onDismiss will also clear this, but we do it here too since onDismiss() is
            // called asynchronously.
            mIsShowing = false;
        } catch (RemoteException ex) {
            Log.e(TAG, "stopSearch() failed: " + ex);
        }
    }

@@ -1648,8 +1629,13 @@ public class SearchManager
     * @hide
     */
    public boolean isVisible() {
        if (DBG) debug("isVisible(), mIsShowing=" + mIsShowing);
        return mIsShowing;
        if (DBG) debug("isVisible()");
        try {
            return mService.isVisible();
        } catch (RemoteException e) {
            Log.e(TAG, "isVisible() failed: " + e);
            return false;
        }
    }

    /**
@@ -1701,7 +1687,6 @@ public class SearchManager
        private final Runnable mFireOnDismiss = new Runnable() {
            public void run() {
                if (DBG) debug("mFireOnDismiss");
                mIsShowing = false;
                if (mDismissListener != null) {
                    mDismissListener.onDismiss();
                }
@@ -1711,7 +1696,6 @@ public class SearchManager
        private final Runnable mFireOnCancel = new Runnable() {
            public void run() {
                if (DBG) debug("mFireOnCancel");
                // doesn't need to clear mIsShowing since onDismiss() always gets called too
                if (mCancelListener != null) {
                    mCancelListener.onCancel();
                }
+26 −23
Original line number Diff line number Diff line
@@ -369,10 +369,8 @@ public abstract class AbstractTableMerger
                // An existing server item has changed
                // If serverSyncVersion is null, there is no edit URL;
                // server won't let this change be written.
                // Just hold onto it, I guess, in case the server permissions
                // change later.
                if (serverSyncVersion != null) {
                boolean recordChanged = (localSyncVersion == null) ||
                        (serverSyncVersion == null) ||
                        !serverSyncVersion.equals(localSyncVersion);
                if (recordChanged) {
                    if (localSyncDirty) {
@@ -393,6 +391,11 @@ public abstract class AbstractTableMerger
                        }
                        update = true;
                    }
                } else {
                    if (Log.isLoggable(TAG, Log.VERBOSE)) {
                        Log.v(TAG,
                                "Skipping update: localSyncVersion: " + localSyncVersion +
                                ", serverSyncVersion: " + serverSyncVersion);
                    }
                }
            } else {
Loading