diff options
| -rw-r--r-- | core/java/android/nfc/technology/Ndef.java | 28 | ||||
| -rw-r--r-- | docs/html/guide/developing/debug-tasks.jd | 4 | ||||
| -rw-r--r-- | docs/html/guide/developing/device.jd | 3 | ||||
| -rw-r--r-- | docs/html/guide/developing/other-ide.jd | 9 | ||||
| -rw-r--r-- | docs/html/guide/developing/tools/index.jd | 3 | ||||
| -rw-r--r-- | docs/html/guide/topics/resources/drawable-resource.jd | 14 | ||||
| -rw-r--r-- | docs/html/sdk/installing.jd | 2 | ||||
| -rw-r--r-- | media/libmedia/AudioSystem.cpp | 3 | 
8 files changed, 38 insertions, 28 deletions
diff --git a/core/java/android/nfc/technology/Ndef.java b/core/java/android/nfc/technology/Ndef.java index c45c97d28237..cd1224912aba 100644 --- a/core/java/android/nfc/technology/Ndef.java +++ b/core/java/android/nfc/technology/Ndef.java @@ -148,17 +148,23 @@ public final class Ndef extends BasicTagTechnology {          checkConnected();          try { -            int errorCode = mTagService.ndefWrite(mTag.getServiceHandle(), msg); -            switch (errorCode) { -                case ErrorCodes.SUCCESS: -                    break; -                case ErrorCodes.ERROR_IO: -                    throw new IOException(); -                case ErrorCodes.ERROR_INVALID_PARAM: -                    throw new FormatException(); -                default: -                    // Should not happen -                    throw new IOException(); +            int serviceHandle = mTag.getServiceHandle(); +            if (mTagService.isNdef(serviceHandle)) { +                int errorCode = mTagService.ndefWrite(serviceHandle, msg); +                switch (errorCode) { +                    case ErrorCodes.SUCCESS: +                        break; +                    case ErrorCodes.ERROR_IO: +                        throw new IOException(); +                    case ErrorCodes.ERROR_INVALID_PARAM: +                        throw new FormatException(); +                    default: +                        // Should not happen +                        throw new IOException(); +                } +            } +            else { +                throw new IOException("Tag is not ndef");              }          } catch (RemoteException e) {              attemptDeadServiceRecovery(e); diff --git a/docs/html/guide/developing/debug-tasks.jd b/docs/html/guide/developing/debug-tasks.jd index f0bf84cf7b89..8f40b48a1f79 100644 --- a/docs/html/guide/developing/debug-tasks.jd +++ b/docs/html/guide/developing/debug-tasks.jd @@ -42,8 +42,8 @@ your applications. Here are some tools that you'll use most often:</p>    <dd>Dumps a log of system        messages. The messages include a stack trace when the device throws an error,        as well as {@link android.util.Log} messages you've written from your application. To run -      logcat, execute <code>adb logcat</code> from your Android SDK {@code tools/} directory or, -from DDMS, select <strong>Device > Run +      logcat, execute <code>adb logcat</code> from your Android SDK {@code platform-tools/} +directory or, from DDMS, select <strong>Device > Run        logcat</strong>. When using the <a href="{@docRoot}sdk/eclipse-adt.html">ADT plugin for  Eclipse</a>, you can also view logcat messages by opening the Logcat view, available from  <strong>Window > Show View > Other > Android > Logcat</strong>. diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd index 2e2d80381fd5..a4cec6333032 100644 --- a/docs/html/guide/developing/device.jd +++ b/docs/html/guide/developing/device.jd @@ -104,7 +104,8 @@ href="#VendorIds">USB Vendor IDs</a>, below.  </ol>  <p>You can verify that your device is connected by executing <code>adb devices</code> from your  -SDK {@code tools/} directory. If connected, you'll see the device name listed as a "device."</p> +SDK {@code platform-tools/} directory. If connected, you'll see the device name listed as a +"device."</p>  <p>If using Eclipse, run or debug as usual. You will be presented  with a <b>Device Chooser</b> dialog that lists the available emulator(s) and connected device(s). diff --git a/docs/html/guide/developing/other-ide.jd b/docs/html/guide/developing/other-ide.jd index 234b18fa751c..d309f47a793e 100644 --- a/docs/html/guide/developing/other-ide.jd +++ b/docs/html/guide/developing/other-ide.jd @@ -166,9 +166,10 @@ alias  <p>Once you've created your project, you're ready to begin development.  You can move your project folder wherever you want for development, but keep in mind  that you must use the <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>  -(adb) — located in the SDK <code>tools/</code> directory — to send your application  +(adb) — located in the SDK <code>platform-tools/</code> directory — to send your +application   to the emulator (discussed later). So you need access between your project solution and  -the <code>tools/</code> folder.</p> +the <code>platform-tools/</code> folder.</p>  <p class="caution"><strong>Caution:</strong> You should refrain from moving the  location of the SDK directory, because this will break the build scripts. (They @@ -460,7 +461,7 @@ arguments:    </li>    <li><strong>Install your application</strong> -    <p>From your SDK's <code>tools/</code> directory, install the {@code .apk} on the +    <p>From your SDK's <code>platform-tools/</code> directory, install the {@code .apk} on the  emulator:      <pre>adb install <em><path_to_your_bin></em>.apk</pre>      <p>Your APK file (signed with either a release or debug key) is in your project {@code bin/} @@ -507,7 +508,7 @@ device:</p>  Development</a> for more information.</p>  <p>Once your device is set up and connected via USB, navigate to your -SDK's <code>tools/</code> directory and install the <code>.apk</code> on the device: +SDK's <code>platform-tools/</code> directory and install the <code>.apk</code> on the device:      <pre>adb -d install <em>path/to/your/app</em>.apk</pre>      <p>The {@code -d} flag specifies that you want to use the attached device (in case you also  have an emulator running).</p> diff --git a/docs/html/guide/developing/tools/index.jd b/docs/html/guide/developing/tools/index.jd index 899c0dc0a09e..b3e462580bc1 100644 --- a/docs/html/guide/developing/tools/index.jd +++ b/docs/html/guide/developing/tools/index.jd @@ -55,7 +55,8 @@ efficiency.                    <dd>The adb tool lets you install your application's .apk files on an                    emulator or device and access the emulator or device from a command line.                    You can also use it to link a standard debugger to application code running -                  on an Android emulator or device.</dd> +                  on an Android emulator or device. +                <p>This is located in {@code <sdk>/platform-tools/}.</p></dd>    <dt><a href="aapt.html">Android Asset            Packaging Tool</a> (aapt)</dt> diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd index 129462e5cb31..d9f619f2b748 100644 --- a/docs/html/guide/topics/resources/drawable-resource.jd +++ b/docs/html/guide/topics/resources/drawable-resource.jd @@ -474,7 +474,7 @@ In XML: <code>@[<em>package</em>:]drawable/<em>filename</em></code>          android:right="<em>dimension</em>"          android:bottom="<em>dimension</em>"          android:left="<em>dimension</em>" /> -</selector> +</layer-list>  </pre>  </dd> @@ -906,7 +906,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" >          android:right="<em>dimension</em>"          android:bottom="<em>dimension</em>"          android:left="<em>dimension</em>" /> -</selector> +</transition>  </pre>  </dd> @@ -926,8 +926,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" >        </dl>      </dd>    <dt id="transition-item-element"><code><item></code></dt> -    <dd>Defines a drawable to place in the layer drawable, in a position defined by its attributes. -Must be a child of a <code><selector></code> element. Accepts child {@code <bitmap>} +    <dd>Defines a drawable to use as part of the drawable transition. +Must be a child of a <code><transition></code> element. Accepts child {@code <bitmap>}  elements.        <p class="caps">attributes:</p>        <dl class="atn-list"> @@ -963,7 +963,7 @@ View.findViewById()} or {@link android.app.Activity#findViewById(int) Activity.f  <transition xmlns:android="http://schemas.android.com/apk/res/android">      <item android:drawable="@drawable/on" />      <item android:drawable="@drawable/off" /> -</layer-list> +</transition>  </pre>  <p>This layout XML applies the drawable to a View:</p> @@ -1226,11 +1226,11 @@ the right edge, a right gravity clips the left edge, and neither clips both edge  <dd>XML file saved at <code>res/drawable/clip.xml</code>:  <pre>  <?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" +<clip xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/android"      android:clipOrientation="horizontal"      android:gravity="left" /> -</shape> +</clip>  </pre>      <p>The following layout XML applies the clip drawable to a View:</p>  <pre> diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd index 488382e53277..9de247aceb10 100644 --- a/docs/html/sdk/installing.jd +++ b/docs/html/sdk/installing.jd @@ -446,7 +446,7 @@ version.</td>  </tr>  <td colspan="3"><code>tools/</code></td>  <td>Contains the set of development and profiling tools that are platform-independent, such -as the emulator, the AVD and SDK Manager, adb, ddms, hierarchyviewer and more. The tools in +as the emulator, the AVD and SDK Manager, ddms, hierarchyviewer and more. The tools in  this directory may be updated at any time (from the <em>Android SDK Tools</em> component),  independent of platform releases, whereas the tools in {@code platform-tools/} may be updated based  on the latest platform release.</td> diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 7e3b7439d83c..9c2a8ba3ab3c 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -763,7 +763,8 @@ bool AudioSystem::isBluetoothScoDevice(audio_devices device)      if ((popCount(device) == 1 ) &&          (device & (AudioSystem::DEVICE_OUT_BLUETOOTH_SCO |                     AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET | -                   AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT))) { +                   AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT | +                   AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET))) {          return true;      } else {          return false;  |