Skip to content

Commit

Permalink
Merge branch 'gingerbread' into gingerbread-release
Browse files Browse the repository at this point in the history
  • Loading branch information
The Android Automerger committed Nov 19, 2010
2 parents ff03f23 + 671a6ff commit 6471cd5
Show file tree
Hide file tree
Showing 21 changed files with 1,404 additions and 261 deletions.
Binary file modified data/sounds/ringtones/Carina.ogg
100755 → 100644
Binary file not shown.
Binary file modified data/sounds/ringtones/Eridani.ogg
100755 → 100644
Binary file not shown.
5 changes: 4 additions & 1 deletion docs/html/guide/topics/manifest/manifest-element.jd
Original file line number Diff line number Diff line change
Expand Up @@ -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>


Expand All @@ -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">&lt;application&gt;</a></code></dd>

</dl>
76 changes: 62 additions & 14 deletions docs/html/guide/topics/manifest/uses-feature-element.jd
Original file line number Diff line number Diff line change
Expand Up @@ -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>&lt;<em>SDK</em>&gt;/platforms/android-&lt;<em>platform</em>&gt;/tools/</code> directory.
If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
<code>&lt;<em>SDK</em>&gt;/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>
Expand Down Expand Up @@ -521,6 +521,14 @@ in a separate <code>&lt;uses-feature&gt;</code> element. </p>
<th>Description</th>
<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>
Expand All @@ -529,7 +537,7 @@ in a separate <code>&lt;uses-feature&gt;</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
Expand All @@ -539,14 +547,18 @@ in a separate <code>&lt;uses-feature&gt;</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>
<tr>
<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>
Expand All @@ -568,20 +580,42 @@ 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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
80 changes: 40 additions & 40 deletions libs/ui/InputDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down Expand Up @@ -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();
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions libs/ui/InputReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down
8 changes: 7 additions & 1 deletion services/sensorservice/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
SensorService.cpp
GravitySensor.cpp \
LinearAccelerationSensor.cpp \
RotationVectorSensor.cpp \
SensorService.cpp \
SensorInterface.cpp \
SensorDevice.cpp \
SecondOrderLowPassFilter.cpp

LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"

Expand Down
Loading

0 comments on commit 6471cd5

Please sign in to comment.