diff options
| -rw-r--r-- | docs/html/guide/topics/manifest/manifest-element.jd | 5 | ||||
| -rw-r--r-- | docs/html/guide/topics/manifest/uses-feature-element.jd | 76 | ||||
| -rw-r--r-- | libs/ui/InputDispatcher.cpp | 80 | ||||
| -rw-r--r-- | libs/ui/InputReader.cpp | 4 |
4 files changed, 108 insertions, 57 deletions
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd index a35c5a1..7f21e6b 100644 --- a/docs/html/guide/topics/manifest/manifest-element.jd +++ b/docs/html/guide/topics/manifest/manifest-element.jd @@ -159,6 +159,9 @@ multiple SD cards can be used with the same device.</li> storage. However, the system will not allow the user to move the application to external storage if this attribute is set to {@code internalOnly}, which is the default setting.</p> +<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for +more information about using this attribute (including how to maintain backward compatibility).</p> + <p>Introduced in: API Level 8.</p> @@ -173,7 +176,7 @@ this attribute is set to {@code internalOnly}, which is the default setting.</p> <p> <dt>see also:</dt> -<dd><a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a><br/> +<dd> <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code></dd> </dl> diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index 45f4a66..b5b30f6 100644 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -472,11 +472,11 @@ If you are developing in Eclipse with ADT, right-click the project and select Package</strong>. Select a destination filename and path and click <strong>OK</strong>. </li> <li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH. -If you are using SDK Tools r7 or earlier, you can find <code>aapt</code> in the -<code><<em>SDK</em>>/platforms/android-<<em>platform</em>>/tools/</code> directory. +If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the +<code><<em>SDK</em>>/platform-tools/</code> directory. <p class="note"><strong>Note:</strong> You must use the version of -<code>aapt</code> that is provided for the latest platform release available. If -you do not have the latest platform release, download it using the <a +<code>aapt</code> that is provided for the latest Platform-Tools component available. If +you do not have the latest Platform-Tools component, download it using the <a href="{@docRoot}sdk/adding-components.html">Android SDK and AVD Manager</a>. </p></li> <li>Run <code>aapt</code> using this syntax: </li> @@ -522,6 +522,14 @@ in a separate <code><uses-feature></code> element. </p> <th>Comments</th> </tr> <tr> + <td>Audio</td> + <td><code>android.hardware.audio.low_latency</td> + <td>The application uses a low-latency audio pipeline on the device and +is sensitive to delays or lag in sound input or output.</td> +<td> +</td> + </tr> + <tr> <td>Bluetooth</td> <td><code>android.hardware.bluetooth</td> <td>The application uses Bluetooth radio features in the device.</td> @@ -529,7 +537,7 @@ in a separate <code><uses-feature></code> element. </p> </td> </tr> <tr> - <td rowspan="3">Camera</td> + <td rowspan="4">Camera</td> <td><code>android.hardware.camera</code></td> <td>The application uses the device's camera. If the device supports multiple cameras, the application uses the camera that facing @@ -539,7 +547,7 @@ in a separate <code><uses-feature></code> element. </p> <tr> <td><code>android.hardware.camera.autofocus</code></td> <td>Subfeature. The application uses the device camera's autofocus capability.</td> - <td rowspan="2">If declared with the <code>"android:required="true"</code> + <td rowspan="3">If declared with the <code>"android:required="true"</code> attribute, these subfeatures implicitly declare the <code>android.hardware.camera</code> parent feature. </td> </tr> @@ -547,6 +555,10 @@ attribute, these subfeatures implicitly declare the <td><code>android.hardware.camera.flash</code></td> <td>Subfeature. The application uses the device camera's flash.</td> </tr> +<tr> + <td><code>android.hardware.camera.front</code></td> + <td>Subfeature. The application uses a front-facing camera on the device.</td> +</tr> <tr> <td rowspan="3">Location</td> @@ -568,21 +580,43 @@ attribute, these subfeatures implicitly declare the <td>Subfeature. The application uses precise location coordinates obtained from a Global Positioning System receiver on the device. </td> </tr> - <tr> - <td rowspan="4">Sensors</td> + <td>Microphone</td> + <td><code>android.hardware.microphone</code></td> + <td>The application uses a microphone on the device. + </td> + <td></td> +</tr> +<tr> + <td>Near Field Communications</td> + <td><code>android.hardware.nfc</td> + <td>The application uses NFC radio features in the device.</td> + <td></td> +</tr> +<tr> + <td rowspan="6">Sensors</td> <td><code>android.hardware.sensor.accelerometer</code></td> <td>The application uses motion readings from an accelerometer on the device.</td> <td></td> </tr> <tr> + <td><code>android.hardware.sensor.barometer</code></td> + <td>The application uses the device's barometer.</td> + <td></td> +</tr> +<tr> <td><code>android.hardware.sensor.compass</code></td> <td>The application uses directional readings from a magnetometer (compass) on the device.</td> <td></td> </tr> <tr> + <td><code>android.hardware.sensor.gyroscope</code></td> + <td>The application uses the device's gyroscope sensor.</td> + <td></td> +</tr> +<tr> <td><code>android.hardware.sensor.light</code></td> <td>The application uses the device's light sensor.</td> <td></td> @@ -593,12 +627,20 @@ the device.</td> <td></td> </tr> <tr> - <td>Microphone</td> - <td><code>android.hardware.microphone</code></td> - <td>The application uses a microphone on the device. + <td rowspan="2">SIP/VOIP</td> + <td><code>android.hardware.sip</code></td> + <td>The application uses SIP service on the device. </td> <td></td> </tr> +<tr> + <td><code>android.hardware.sip.voip</code></td> + <td>Subfeature. The application uses SIP-based VOIP service on the device. + </td> + <td>If declared with the <code>"android:required="true"</code> attribute, this +subfeature implicitly declares the <code>android.hardware.sip</code> +parent feature.</td> +</tr> <tr> <td rowspan="3">Telephony</td> @@ -622,14 +664,14 @@ device.</td> </tr> <tr> - <td rowspan="3">Touchscreen</td> + <td rowspan="4">Touchscreen</td> <td><code>android.hardware.touchscreen</code></td> <td>The application uses touchscreen capabilities on the device.</td> <td></td> </tr> <tr> <td><code>android.hardware.touchscreen.multitouch</code></td> - <td>The application uses basic two-point multitouch capabilities on the device + <td>Subfeature. The application uses basic two-point multitouch capabilities on the device screen.</td> <td>If declared with the <code>"android:required="true"</code> attribute, this subfeature implicitly declares the <code>android.hardware.touchscreen</code> @@ -640,10 +682,16 @@ parent feature. </td> <td>Subfeature. The application uses advanced multipoint multitouch capabilities on the device screen, such as for tracking two or more points fully independently.</td> - <td>If declared with the <code>"android:required="true"</code> attribute, this + <td rowspan="2">If declared with the <code>"android:required="true"</code> attribute, this subfeature implicitly declares the <code>android.hardware.touchscreen.multitouch</code> parent feature. </td> </tr> +<tr> + <td><code>android.hardware.touchscreen.multitouch.jazzhand</code></td> + <td>Subfeature. The application uses advanced multipoint multitouch +capabilities on the device screen, for tracking up to five points fully +independently.</td> +</tr> <tr> <td>Wifi</td> diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index c0b27fe..28ccc43 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -619,38 +619,8 @@ bool InputDispatcher::dispatchConfigurationChangedLocked( bool InputDispatcher::dispatchKeyLocked( nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout, DropReason* dropReason, nsecs_t* nextWakeupTime) { - // Give the policy a chance to intercept the key. - if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) { - if (entry->policyFlags & POLICY_FLAG_PASS_TO_USER) { - CommandEntry* commandEntry = postCommandLocked( - & InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible); - if (mFocusedWindow) { - commandEntry->inputChannel = mFocusedWindow->inputChannel; - } - commandEntry->keyEntry = entry; - entry->refCount += 1; - return false; // wait for the command to run - } else { - entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE; - } - } else if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_SKIP) { - if (*dropReason == DROP_REASON_NOT_DROPPED) { - *dropReason = DROP_REASON_POLICY; - } - } - - // Clean up if dropping the event. - if (*dropReason != DROP_REASON_NOT_DROPPED) { - resetTargetsLocked(); - setInjectionResultLocked(entry, *dropReason == DROP_REASON_POLICY - ? INPUT_EVENT_INJECTION_SUCCEEDED : INPUT_EVENT_INJECTION_FAILED); - return true; - } - // Preprocessing. if (! entry->dispatchInProgress) { - logOutboundKeyDetailsLocked("dispatchKey - ", entry); - if (entry->repeatCount == 0 && entry->action == AKEY_EVENT_ACTION_DOWN && (entry->policyFlags & POLICY_FLAG_TRUSTED) @@ -677,6 +647,36 @@ bool InputDispatcher::dispatchKeyLocked( entry->dispatchInProgress = true; resetTargetsLocked(); + + logOutboundKeyDetailsLocked("dispatchKey - ", entry); + } + + // Give the policy a chance to intercept the key. + if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) { + if (entry->policyFlags & POLICY_FLAG_PASS_TO_USER) { + CommandEntry* commandEntry = postCommandLocked( + & InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible); + if (mFocusedWindow) { + commandEntry->inputChannel = mFocusedWindow->inputChannel; + } + commandEntry->keyEntry = entry; + entry->refCount += 1; + return false; // wait for the command to run + } else { + entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE; + } + } else if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_SKIP) { + if (*dropReason == DROP_REASON_NOT_DROPPED) { + *dropReason = DROP_REASON_POLICY; + } + } + + // Clean up if dropping the event. + if (*dropReason != DROP_REASON_NOT_DROPPED) { + resetTargetsLocked(); + setInjectionResultLocked(entry, *dropReason == DROP_REASON_POLICY + ? INPUT_EVENT_INJECTION_SUCCEEDED : INPUT_EVENT_INJECTION_FAILED); + return true; } // Identify targets. @@ -705,16 +705,24 @@ void InputDispatcher::logOutboundKeyDetailsLocked(const char* prefix, const KeyE #if DEBUG_OUTBOUND_EVENT_DETAILS LOGD("%seventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, " "action=0x%x, flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, " - "downTime=%lld", + "repeatCount=%d, downTime=%lld", prefix, entry->eventTime, entry->deviceId, entry->source, entry->policyFlags, entry->action, entry->flags, entry->keyCode, entry->scanCode, entry->metaState, - entry->downTime); + entry->repeatCount, entry->downTime); #endif } bool InputDispatcher::dispatchMotionLocked( nsecs_t currentTime, MotionEntry* entry, DropReason* dropReason, nsecs_t* nextWakeupTime) { + // Preprocessing. + if (! entry->dispatchInProgress) { + entry->dispatchInProgress = true; + resetTargetsLocked(); + + logOutboundMotionDetailsLocked("dispatchMotion - ", entry); + } + // Clean up if dropping the event. if (*dropReason != DROP_REASON_NOT_DROPPED) { resetTargetsLocked(); @@ -723,14 +731,6 @@ bool InputDispatcher::dispatchMotionLocked( return true; } - // Preprocessing. - if (! entry->dispatchInProgress) { - logOutboundMotionDetailsLocked("dispatchMotion - ", entry); - - entry->dispatchInProgress = true; - resetTargetsLocked(); - } - bool isPointerEvent = entry->source & AINPUT_SOURCE_CLASS_POINTER; // Identify targets. diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp index d167439..3197ab2 100644 --- a/libs/ui/InputReader.cpp +++ b/libs/ui/InputReader.cpp @@ -934,7 +934,7 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, ssize_t keyDownIndex = findKeyDownLocked(scanCode); if (keyDownIndex >= 0) { // key repeat, be sure to use same keycode as before in case of rotation - keyCode = mLocked.keyDowns.top().keyCode; + keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode; } else { // key down mLocked.keyDowns.push(); @@ -949,7 +949,7 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, ssize_t keyDownIndex = findKeyDownLocked(scanCode); if (keyDownIndex >= 0) { // key up, be sure to use same keycode as before in case of rotation - keyCode = mLocked.keyDowns.top().keyCode; + keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode; mLocked.keyDowns.removeAt(size_t(keyDownIndex)); } else { // key was not actually down |
