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

Commit 5e37d1db authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'froyo' into froyo-release

parents 502182cc 8d318958
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -381,6 +381,8 @@ web_docs_sample_code_flags := \
		-hdf android.hasSamples 1 \
		-samplecode $(sample_dir)/ApiDemos \
		            resources/samples/ApiDemos "API Demos" \
		-samplecode $(sample_dir)/BackupRestore \
		            resources/samples/BackupRestore "Backup and Restore" \
		-samplecode $(sample_dir)/BluetoothChat \
		            resources/samples/BluetoothChat "Bluetooth Chat" \
		-samplecode $(sample_dir)/BusinessCard \
+30 −30
Original line number Diff line number Diff line
@@ -71656,7 +71656,7 @@
<exception name="IOException" type="java.io.IOException">
</exception>
</method>
<method name="setZoomCallback"
<method name="setZoomChangeListener"
 return="void"
 abstract="false"
 native="false"
@@ -71666,7 +71666,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="cb" type="android.hardware.Camera.ZoomCallback">
<parameter name="listener" type="android.hardware.Camera.OnZoomChangeListener">
</parameter>
</method>
<method name="startPreview"
@@ -71831,6 +71831,31 @@
</parameter>
</method>
</interface>
<interface name="Camera.OnZoomChangeListener"
 abstract="true"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="onZoomChange"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="zoomValue" type="int">
</parameter>
<parameter name="stopped" type="boolean">
</parameter>
<parameter name="camera" type="android.hardware.Camera">
</parameter>
</method>
</interface>
<class name="Camera.Parameters"
 extends="java.lang.Object"
 abstract="false"
@@ -73255,31 +73280,6 @@
>
</field>
</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="zoomValue" type="int">
</parameter>
<parameter name="stopped" type="boolean">
</parameter>
<parameter name="camera" type="android.hardware.Camera">
</parameter>
</method>
</interface>
<class name="GeomagneticField"
 extends="java.lang.Object"
 abstract="false"
@@ -85230,7 +85230,7 @@
</parameter>
<parameter name="mimeTypes" type="java.lang.String[]">
</parameter>
<parameter name="callback" type="android.media.MediaScannerConnection.ScanResultListener">
<parameter name="callback" type="android.media.MediaScannerConnection.OnScanCompletedListener">
</parameter>
</method>
</class>
@@ -85241,7 +85241,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<implements name="android.media.MediaScannerConnection.ScanResultListener">
<implements name="android.media.MediaScannerConnection.OnScanCompletedListener">
</implements>
<method name="onMediaScannerConnected"
 return="void"
@@ -85270,7 +85270,7 @@
</parameter>
</method>
</interface>
<interface name="MediaScannerConnection.ScanResultListener"
<interface name="MediaScannerConnection.OnScanCompletedListener"
 abstract="true"
 static="true"
 final="false"
+69 −3
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.commands.pm;

import com.android.internal.content.PackageHelper;

import android.content.ComponentName;
import android.content.pm.ApplicationInfo;
import android.content.pm.FeatureInfo;
@@ -33,6 +35,7 @@ import android.content.res.Resources;
import android.net.Uri;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Settings;

import java.io.File;
import java.lang.reflect.Field;
@@ -107,6 +110,16 @@ public final class Pm {
            return;
        }

        if ("setInstallLocation".equals(op)) {
            runSetInstallLocation();
            return;
        }

        if ("getInstallLocation".equals(op)) {
            runGetInstallLocation();
            return;
        }

        try {
            if (args.length == 1) {
                if (args[0].equalsIgnoreCase("-l")) {
@@ -575,6 +588,51 @@ public final class Pm {
        return Integer.toString(result);
    }

    private void runSetInstallLocation() {
        int loc;

        String arg = nextArg();
        if (arg == null) {
            System.err.println("Error: no install location specified.");
            showUsage();
            return;
        }
        try {
            loc = Integer.parseInt(arg);
        } catch (NumberFormatException e) {
            System.err.println("Error: install location has to be a number.");
            showUsage();
            return;
        }
        try {
            if (!mPm.setInstallLocation(loc)) {
                System.err.println("Error: install location has to be a number.");
                showUsage();
            }
        } catch (RemoteException e) {
            System.err.println(e.toString());
            System.err.println(PM_NOT_RUNNING_ERR);
        }
    }

    private void runGetInstallLocation() {
        try {
            int loc = mPm.getInstallLocation();
            String locStr = "invalid";
            if (loc == PackageHelper.APP_INSTALL_AUTO) {
                locStr = "auto";
            } else if (loc == PackageHelper.APP_INSTALL_INTERNAL) {
                locStr = "internal";
            } else if (loc == PackageHelper.APP_INSTALL_EXTERNAL) {
                locStr = "external";
            }
            System.out.println(loc + "[" + locStr + "]");
        } catch (RemoteException e) {
            System.err.println(e.toString());
            System.err.println(PM_NOT_RUNNING_ERR);
        }
    }

    private void runInstall() {
        int installFlags = 0;
        String installerPackageName = null;
@@ -832,6 +890,7 @@ public final class Pm {
        System.err.println("       pm uninstall [-k] PACKAGE");
        System.err.println("       pm enable PACKAGE_OR_COMPONENT");
        System.err.println("       pm disable PACKAGE_OR_COMPONENT");
        System.err.println("       pm setInstallLocation [0/auto] [1/internal] [2/external]");
        System.err.println("");
        System.err.println("The list packages command prints all packages.  Options:");
        System.err.println("  -f: see their associated file.");
@@ -867,10 +926,17 @@ public final class Pm {
        System.err.println("  -k: keep the data and cache directories around.");
        System.err.println("after the package removal.");
        System.err.println("");
        System.err.println("The mountsd command simulates mounting/unmounting sdcard.Options:");
        System.err.println("  -m: true or false.");
        System.err.println("");
        System.err.println("The enable and disable commands change the enabled state of");
        System.err.println("a given package or component (written as \"package/class\").");
        System.err.println("");
        System.err.println("The getInstallLocation command gets the current install location");
        System.err.println("  0 [auto]: Let system decide the best location");
        System.err.println("  1 [internal]: Install on internal device storage");
        System.err.println("  2 [external]: Install on external media");
        System.err.println("");
        System.err.println("The setInstallLocation command changes the default install location");
        System.err.println("  0 [auto]: Let system decide the best location");
        System.err.println("  1 [internal]: Install on internal device storage");
        System.err.println("  2 [external]: Install on external media");
    }
}
+3 −2
Original line number Diff line number Diff line
@@ -1482,7 +1482,8 @@ class ContextImpl extends Context {
        mPackageInfo = packageInfo;
        mResources = mPackageInfo.getResources(mainThread);

        if (container != null && container.getCompatibilityInfo().applicationScale !=
        if (mResources != null && container != null
                && container.getCompatibilityInfo().applicationScale !=
                        mResources.getCompatibilityInfo().applicationScale) {
            if (DEBUG) {
                Log.d(TAG, "loaded context has different scaling. Using container's" +
+12 −3
Original line number Diff line number Diff line
@@ -123,6 +123,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
    // that modifies the contents of the text field. But if the user then edits
    // the suggestion, the resulting string is saved.
    private String mUserQuery;
    // The query passed in when opening the SearchDialog.  Used in the browser
    // case to determine whether the user has edited the query.
    private String mInitialQuery;
    
    // A weak map of drawables we've gotten from other packages, so we don't load them
    // more than once.
@@ -253,6 +256,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
            return false;
        }

        mInitialQuery = initialQuery == null ? "" : initialQuery;
        // finally, load the user's initial text (which may trigger suggestions)
        setUserQuery(initialQuery);
        if (selectInitialQuery) {
@@ -329,6 +333,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        mAppSearchData = null;
        mSearchable = null;
        mUserQuery = null;
        mInitialQuery = null;
    }

    /**
@@ -687,13 +692,16 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
            if (mSearchable == null) {
                return;
            }
            updateWidgetState();
            if (!mSearchAutoComplete.isPerformingCompletion()) {
                // The user changed the query, remember it.
                mUserQuery = s == null ? "" : s.toString();
            }
            updateWidgetState();
            // Always want to show the microphone if the context is voice.
            // Also show the microphone if this is a browser search and the
            // query matches the initial query.
            updateVoiceButton(mSearchAutoComplete.isEmpty()
                    || (isBrowserSearch() && mInitialQuery.equals(mUserQuery))
                    || (mAppSearchData != null && mAppSearchData.getBoolean(
                    SearchManager.CONTEXT_IS_VOICE)));
        }
@@ -724,8 +732,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        // enable the button if we have one or more non-space characters
        boolean enabled = !mSearchAutoComplete.isEmpty();
        if (isBrowserSearch()) {
            // In the browser, we hide the search button when there is no text
            if (enabled) {
            // In the browser, we hide the search button when there is no text,
            // or if the text matches the initial query.
            if (enabled && !mInitialQuery.equals(mUserQuery)) {
                mSearchAutoComplete.setBackgroundResource(
                        com.android.internal.R.drawable.textfield_search);
                mGoButton.setVisibility(View.VISIBLE);
Loading