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

Commit 30ef37ff authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

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

parents 082c2af6 fb54aadd
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -51157,7 +51157,7 @@
<method name="breakText"
<method name="breakText"
 return="int"
 return="int"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -51201,7 +51201,7 @@
<method name="breakText"
<method name="breakText"
 return="int"
 return="int"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -51769,7 +51769,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -51786,7 +51786,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -51803,7 +51803,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
+172 −41
Original line number Original line Diff line number Diff line
@@ -2550,6 +2550,17 @@
 visibility="public"
 visibility="public"
>
>
</field>
</field>
<field name="colorBackgroundCacheHint"
 type="int"
 transient="false"
 volatile="false"
 value="16843435"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="colorForeground"
<field name="colorForeground"
 type="int"
 type="int"
 transient="false"
 transient="false"
@@ -58550,7 +58561,7 @@
<method name="breakText"
<method name="breakText"
 return="int"
 return="int"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -58594,7 +58605,7 @@
<method name="breakText"
<method name="breakText"
 return="int"
 return="int"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -59162,7 +59173,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -59179,7 +59190,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -59196,7 +59207,7 @@
<method name="measureText"
<method name="measureText"
 return="float"
 return="float"
 abstract="false"
 abstract="false"
 native="true"
 native="false"
 synchronized="false"
 synchronized="false"
 static="false"
 static="false"
 final="false"
 final="false"
@@ -67537,19 +67548,6 @@
<exception name="IOException" type="java.io.IOException">
<exception name="IOException" type="java.io.IOException">
</exception>
</exception>
</method>
</method>
<method name="setZoomCallback"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="cb" type="android.hardware.Camera.ZoomCallback">
</parameter>
</method>
<method name="startPreview"
<method name="startPreview"
 return="void"
 return="void"
 abstract="false"
 abstract="false"
@@ -68930,29 +68928,6 @@
>
>
</field>
</field>
</class>
</class>
<interface name="Camera.ZoomCallback"
 abstract="true"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="onZoomUpdate"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="zoomLevel" type="int">
</parameter>
<parameter name="camera" type="android.hardware.Camera">
</parameter>
</method>
</interface>
<class name="GeomagneticField"
<class name="GeomagneticField"
 extends="java.lang.Object"
 extends="java.lang.Object"
 abstract="false"
 abstract="false"
@@ -117894,6 +117869,21 @@
 visibility="public"
 visibility="public"
>
>
</constructor>
</constructor>
<method name="cancelThumbnailRequest"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="cr" type="android.content.ContentResolver">
</parameter>
<parameter name="origId" type="long">
</parameter>
</method>
<method name="getContentUri"
<method name="getContentUri"
 return="android.net.Uri"
 return="android.net.Uri"
 abstract="false"
 abstract="false"
@@ -118336,6 +118326,21 @@
 visibility="public"
 visibility="public"
>
>
</constructor>
</constructor>
<method name="cancelThumbnailRequest"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="cr" type="android.content.ContentResolver">
</parameter>
<parameter name="origId" type="long">
</parameter>
</method>
<method name="getContentUri"
<method name="getContentUri"
 return="android.net.Uri"
 return="android.net.Uri"
 abstract="false"
 abstract="false"
@@ -123244,6 +123249,23 @@
<parameter name="b" type="java.lang.String">
<parameter name="b" type="java.lang.String">
</parameter>
</parameter>
</method>
</method>
<method name="compare"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="context" type="android.content.Context">
</parameter>
<parameter name="a" type="java.lang.String">
</parameter>
<parameter name="b" type="java.lang.String">
</parameter>
</method>
<method name="convertKeypadLettersToDigits"
<method name="convertKeypadLettersToDigits"
 return="java.lang.String"
 return="java.lang.String"
 abstract="false"
 abstract="false"
@@ -155353,6 +155375,21 @@
<parameter name="startDelay" type="int">
<parameter name="startDelay" type="int">
</parameter>
</parameter>
</method>
</method>
<method name="awakenScrollBars"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="protected"
>
<parameter name="startDelay" type="int">
</parameter>
<parameter name="invalidate" type="boolean">
</parameter>
</method>
<method name="bringToFront"
<method name="bringToFront"
 return="void"
 return="void"
 abstract="false"
 abstract="false"
@@ -171993,6 +172030,48 @@
</parameter>
</parameter>
</method>
</method>
</interface>
</interface>
<class name="GeolocationPermissions"
 extends="java.lang.Object"
 abstract="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<constructor name="GeolocationPermissions"
 type="android.webkit.GeolocationPermissions"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</constructor>
</class>
<interface name="GeolocationPermissions.Callback"
 abstract="true"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="invoke"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="origin" type="java.lang.String">
</parameter>
<parameter name="allow" type="boolean">
</parameter>
<parameter name="remember" type="boolean">
</parameter>
</method>
</interface>
<class name="HttpAuthHandler"
<class name="HttpAuthHandler"
 extends="android.os.Handler"
 extends="android.os.Handler"
 abstract="false"
 abstract="false"
@@ -173094,6 +173173,32 @@
<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
</parameter>
</parameter>
</method>
</method>
<method name="onGeolocationPermissionsHidePrompt"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="onGeolocationPermissionsShowPrompt"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="origin" type="java.lang.String">
</parameter>
<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
</parameter>
</method>
<method name="onJsAlert"
<method name="onJsAlert"
 return="boolean"
 return="boolean"
 abstract="false"
 abstract="false"
@@ -173932,6 +174037,32 @@
<parameter name="font" type="java.lang.String">
<parameter name="font" type="java.lang.String">
</parameter>
</parameter>
</method>
</method>
<method name="setGeolocationDatabasePath"
 return="void"
 abstract="false"
 native="false"
 synchronized="true"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="databasePath" type="java.lang.String">
</parameter>
</method>
<method name="setGeolocationEnabled"
 return="void"
 abstract="false"
 native="false"
 synchronized="true"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="flag" type="boolean">
</parameter>
</method>
<method name="setJavaScriptCanOpenWindowsAutomatically"
<method name="setJavaScriptCanOpenWindowsAutomatically"
 return="void"
 return="void"
 abstract="false"
 abstract="false"
+58 −13
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@ import com.android.internal.R;
public class AccountManagerService
public class AccountManagerService
        extends IAccountManager.Stub
        extends IAccountManager.Stub
        implements RegisteredServicesCacheListener {
        implements RegisteredServicesCacheListener {
    private static final String GOOGLE_ACCOUNT_TYPE = "com.google.GAIA";
    private static final String GOOGLE_ACCOUNT_TYPE = "com.google";


    private static final String NO_BROADCAST_FLAG = "nobroadcast";
    private static final String NO_BROADCAST_FLAG = "nobroadcast";


@@ -81,7 +81,7 @@ public class AccountManagerService


    private static final int TIMEOUT_DELAY_MS = 1000 * 60;
    private static final int TIMEOUT_DELAY_MS = 1000 * 60;
    private static final String DATABASE_NAME = "accounts.db";
    private static final String DATABASE_NAME = "accounts.db";
    private static final int DATABASE_VERSION = 3;
    private static final int DATABASE_VERSION = 4;


    private final Context mContext;
    private final Context mContext;


@@ -102,6 +102,7 @@ public class AccountManagerService
    private static final String ACCOUNTS_ID = "_id";
    private static final String ACCOUNTS_ID = "_id";
    private static final String ACCOUNTS_NAME = "name";
    private static final String ACCOUNTS_NAME = "name";
    private static final String ACCOUNTS_TYPE = "type";
    private static final String ACCOUNTS_TYPE = "type";
    private static final String ACCOUNTS_TYPE_COUNT = "count(type)";
    private static final String ACCOUNTS_PASSWORD = "password";
    private static final String ACCOUNTS_PASSWORD = "password";


    private static final String TABLE_AUTHTOKENS = "authtokens";
    private static final String TABLE_AUTHTOKENS = "authtokens";
@@ -127,6 +128,8 @@ public class AccountManagerService


    private static final String[] ACCOUNT_NAME_TYPE_PROJECTION =
    private static final String[] ACCOUNT_NAME_TYPE_PROJECTION =
            new String[]{ACCOUNTS_ID, ACCOUNTS_NAME, ACCOUNTS_TYPE};
            new String[]{ACCOUNTS_ID, ACCOUNTS_NAME, ACCOUNTS_TYPE};
    private static final String[] ACCOUNT_TYPE_COUNT_PROJECTION =
            new String[] { ACCOUNTS_TYPE, ACCOUNTS_TYPE_COUNT};
    private static final Intent ACCOUNTS_CHANGED_INTENT;
    private static final Intent ACCOUNTS_CHANGED_INTENT;


    private static final String COUNT_OF_MATCHING_GRANTS = ""
    private static final String COUNT_OF_MATCHING_GRANTS = ""
@@ -1376,6 +1379,12 @@ public class AccountManagerService
                createAccountsDeletionTrigger(db);
                createAccountsDeletionTrigger(db);
                oldVersion++;
                oldVersion++;
            }
            }

            if (oldVersion == 3) {
                db.execSQL("UPDATE " + TABLE_ACCOUNTS + " SET " + ACCOUNTS_TYPE +
                        " = 'com.google' WHERE " + ACCOUNTS_TYPE + " == 'com.google.GAIA'");
                oldVersion++;
            }
        }
        }


        @Override
        @Override
@@ -1455,7 +1464,43 @@ public class AccountManagerService
        return asBinder();
        return asBinder();
    }
    }


    /**
     * Searches array of arguments for the specified string
     * @param args array of argument strings
     * @param value value to search for
     * @return true if the value is contained in the array
     */
    private static boolean scanArgs(String[] args, String value) {
        if (args != null) {
            for (String arg : args) {
                if (value.equals(arg)) {
                    return true;
                }
            }
        }
        return false;
    }

    protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
    protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
        final boolean isCheckinRequest = scanArgs(args, "--checkin") || scanArgs(args, "-c");

        if (isCheckinRequest) {
            // This is a checkin request. *Only* upload the account types and the count of each.
            SQLiteDatabase db = mOpenHelper.getReadableDatabase();

            Cursor cursor = db.query(TABLE_ACCOUNTS, ACCOUNT_TYPE_COUNT_PROJECTION,
                    null, null, ACCOUNTS_TYPE, null, null);
            try {
                while (cursor.moveToNext()) {
                    // print type,count
                    fout.println(cursor.getString(0) + "," + cursor.getString(1));
                }
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        } else {
            synchronized (mSessions) {
            synchronized (mSessions) {
                final long now = SystemClock.elapsedRealtime();
                final long now = SystemClock.elapsedRealtime();
                fout.println("AccountManagerService: " + mSessions.size() + " sessions");
                fout.println("AccountManagerService: " + mSessions.size() + " sessions");
@@ -1465,9 +1510,9 @@ public class AccountManagerService
            }
            }


            fout.println();
            fout.println();

            mAuthenticatorCache.dump(fd, fout, args);
            mAuthenticatorCache.dump(fd, fout, args);
        }
        }
    }


    private void doNotification(Account account, CharSequence message, Intent intent) {
    private void doNotification(Account account, CharSequence message, Intent intent) {
        long identityToken = clearCallingIdentity();
        long identityToken = clearCallingIdentity();
+27 −20
Original line number Original line Diff line number Diff line
@@ -127,8 +127,8 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
    private ArrayList<ComponentName> mPreviousComponents;
    private ArrayList<ComponentName> mPreviousComponents;


    // For voice searching
    // For voice searching
    private Intent mVoiceWebSearchIntent;
    private final Intent mVoiceWebSearchIntent;
    private Intent mVoiceAppSearchIntent;
    private final Intent mVoiceAppSearchIntent;


    // support for AutoCompleteTextView suggestions display
    // support for AutoCompleteTextView suggestions display
    private SuggestionsAdapter mSuggestionsAdapter;
    private SuggestionsAdapter mSuggestionsAdapter;
@@ -156,18 +156,25 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
     */
     */
    public SearchDialog(Context context) {
    public SearchDialog(Context context) {
        super(context, com.android.internal.R.style.Theme_GlobalSearchBar);
        super(context, com.android.internal.R.style.Theme_GlobalSearchBar);

        // Save voice intent for later queries/launching
        mVoiceWebSearchIntent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
        mVoiceWebSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        mVoiceWebSearchIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);

        mVoiceAppSearchIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        mVoiceAppSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    }
    }


    /**
    /**
     * We create the search dialog just once, and it stays around (hidden)
     * Create the search dialog and any resources that are used for the
     * until activated by the user.
     * entire lifetime of the dialog.
     */
     */
    @Override
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);


        setContentView(com.android.internal.R.layout.search_bar);

        Window theWindow = getWindow();
        Window theWindow = getWindow();
        WindowManager.LayoutParams lp = theWindow.getAttributes();
        WindowManager.LayoutParams lp = theWindow.getAttributes();
        lp.type = WindowManager.LayoutParams.TYPE_SEARCH_BAR;
        lp.type = WindowManager.LayoutParams.TYPE_SEARCH_BAR;
@@ -180,6 +187,17 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
        lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
        theWindow.setAttributes(lp);
        theWindow.setAttributes(lp);


        // Touching outside of the search dialog will dismiss it
        setCanceledOnTouchOutside(true);        
    }

    /**
     * We recreate the dialog view each time it becomes visible so as to limit
     * the scope of any problems with the contained resources.
     */
    private void createContentView() {
        setContentView(com.android.internal.R.layout.search_bar);

        // get the view elements for local access
        // get the view elements for local access
        SearchBar searchBar = (SearchBar) findViewById(com.android.internal.R.id.search_bar);
        SearchBar searchBar = (SearchBar) findViewById(com.android.internal.R.id.search_bar);
        searchBar.setSearchDialog(this);
        searchBar.setSearchDialog(this);
@@ -211,19 +229,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        mBadgeLabel.setVisibility(View.GONE);
        mBadgeLabel.setVisibility(View.GONE);


        // Additional adjustments to make Dialog work for Search
        // Additional adjustments to make Dialog work for Search

        // Touching outside of the search dialog will dismiss it 
        setCanceledOnTouchOutside(true);

        // Save voice intent for later queries/launching
        mVoiceWebSearchIntent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
        mVoiceWebSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        mVoiceWebSearchIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);
        
        mVoiceAppSearchIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        mVoiceAppSearchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        mSearchAutoCompleteImeOptions = mSearchAutoComplete.getImeOptions();
        mSearchAutoCompleteImeOptions = mSearchAutoComplete.getImeOptions();
    }
    }


@@ -359,6 +364,8 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        mGlobalSearchMode = globalSearch || searchManager.isDefaultSearchable(mSearchable);
        mGlobalSearchMode = globalSearch || searchManager.isDefaultSearchable(mSearchable);
        mActivityContext = mSearchable.getActivityContext(getContext());
        mActivityContext = mSearchable.getActivityContext(getContext());


        createContentView();

        // show the dialog. this will call onStart().
        // show the dialog. this will call onStart().
        if (!isShowing()) {            
        if (!isShowing()) {            
            // The Dialog uses a ContextThemeWrapper for the context; use this to change the
            // The Dialog uses a ContextThemeWrapper for the context; use this to change the
+1 −1
Original line number Original line Diff line number Diff line
@@ -170,7 +170,7 @@ public abstract class AbstractSyncableContentProvider extends SyncableContentPro
                        // AbstractGDataSyncAdapter, which will put acore into a crash loop
                        // AbstractGDataSyncAdapter, which will put acore into a crash loop
                        ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
                        ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
                        for (Account acct: accounts) {
                        for (Account acct: accounts) {
                            if (acct.type.equals("com.google.GAIA")) {
                            if (acct.type.equals("com.google")) {
                                gaiaAccounts.add(acct);
                                gaiaAccounts.add(acct);
                            }
                            }
                        }
                        }
Loading