Merge change I0fae86b8 into eclair
* changes:
Make QuickContact styles public.
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index 3265ac4..7f5a1e7 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -330,8 +330,8 @@
* you'll need to update your searchable activity (or other activities) to receive the intents
* as you've defined them.</li>
* <li>Implement a Content Provider that provides suggestions. If you already have one, and it
- * has access to your suggestions data. If not, you'll have to create one.
- * You'll also provide information about your Content Provider in your
+ * has access to your suggestions data, you can use that provider. If not, you'll have to create
+ * one. You'll also provide information about your Content Provider in your
* package's <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest</a>.</li>
* <li>Update your searchable activity's XML configuration file. There are two categories of
* information used for suggestions:
@@ -1181,7 +1181,7 @@
* Bundle appData = new Bundle();
* appData.put...();
* appData.put...();
- * startSearch(null, false, appData);
+ * startSearch(null, false, appData, false);
* return true;
* }</pre>
*
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 0ce2f7b..f5fed4f 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -46,13 +46,21 @@
/** A constant describing a gyroscope sensor type */
public static final int TYPE_GYROSCOPE = 4;
- /** A constant describing a light sensor type */
+ /**
+ * A constant describing an light sensor type.
+ * See {@link android.hardware.SensorEvent SensorEvent}
+ * for more details.
+ */
public static final int TYPE_LIGHT = 5;
/** A constant describing a pressure sensor type */
public static final int TYPE_PRESSURE = 6;
/** A constant describing a temperature sensor type */
public static final int TYPE_TEMPERATURE = 7;
- /** A constant describing a proximity sensor type */
+ /**
+ * A constant describing an proximity sensor type.
+ * See {@link android.hardware.SensorEvent SensorEvent}
+ * for more details.
+ */
public static final int TYPE_PROXIMITY = 8;
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index cf939c5..32d5691 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -115,8 +115,19 @@
* <p>{@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD Sensor.TYPE_MAGNETIC_FIELD}:<p>
* All values are in micro-Tesla (uT) and measure the ambient magnetic
* field in the X, Y and Z axis.
- *
- */
+ *
+ * <p>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:<p>
+ *
+ * <p>values[0]: Ambient light level in SI lux units
+ *
+ * <p>{@link android.hardware.Sensor#TYPE_PROXIMITY Sensor.TYPE_PROXIMITY}:<p>
+ *
+ * <p>values[0]: Proximity sensor distance measured in centimeters
+ *
+ * <p> Note that some proximity sensors only support a binary "close" or "far" measurement.
+ * In this case, the sensor should report its maxRange value in the "far" state and a value
+ * less than maxRange in the "near" state.
+ */
public final float[] values;
/**
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index c4711f8..9638262 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -313,6 +313,8 @@
private boolean mIsCallLogComposer = false;
+ private boolean mNeedPhotoForVCard = true;
+
private static final String[] sContactsProjection = new String[] {
Contacts._ID,
};
@@ -332,17 +334,17 @@
private static final String FLAG_TIMEZONE_UTC = "Z";
public VCardComposer(Context context) {
- this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false);
+ this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false, true);
}
public VCardComposer(Context context, String vcardTypeStr,
boolean careHandlerErrors) {
this(context, VCardConfig.getVCardTypeFromString(vcardTypeStr),
- careHandlerErrors, false);
+ careHandlerErrors, false, true);
}
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors) {
- this(context, vcardType, careHandlerErrors, false);
+ this(context, vcardType, careHandlerErrors, false, true);
}
/**
@@ -351,11 +353,12 @@
* @param isCallLogComposer true if this composer is for creating Call Log vCard.
*/
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors,
- boolean isCallLogComposer) {
+ boolean isCallLogComposer, boolean needPhotoInVCard) {
mContext = context;
mVCardType = vcardType;
mCareHandlerErrors = careHandlerErrors;
mIsCallLogComposer = isCallLogComposer;
+ mNeedPhotoForVCard = needPhotoInVCard;
mContentResolver = context.getContentResolver();
mIsV30 = VCardConfig.isV30(vcardType);
@@ -679,7 +682,9 @@
appendWebsites(builder, contentValuesListMap);
appendBirthday(builder, contentValuesListMap);
appendOrganizations(builder, contentValuesListMap);
- appendPhotos(builder, contentValuesListMap);
+ if (mNeedPhotoForVCard) {
+ appendPhotos(builder, contentValuesListMap);
+ }
appendNotes(builder, contentValuesListMap);
// TODO: GroupMembership
diff --git a/core/java/android/util/AttributeSet.java b/core/java/android/util/AttributeSet.java
index 01a7ad4..82592b9 100644
--- a/core/java/android/util/AttributeSet.java
+++ b/core/java/android/util/AttributeSet.java
@@ -34,13 +34,13 @@
* <p>This interface provides an efficient mechanism for retrieving
* data from compiled XML files, which can be retrieved for a particular
* XmlPullParser through {@link Xml#asAttributeSet
- * Xml.getAttributeSet()}. Normally this will return an implementation
+ * Xml.asAttributeSet()}. Normally this will return an implementation
* of the interface that works on top of a generic XmlPullParser, however it
* is more useful in conjunction with compiled XML resources:
*
* <pre>
* XmlPullParser parser = resources.getXml(myResouce);
- * AttributeSet attributes = Xml.getAttributeSet(parser);</pre>
+ * AttributeSet attributes = Xml.asAttributeSet(parser);</pre>
*
* <p>The implementation returned here, unlike using
* the implementation on top of a generic XmlPullParser,
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index 74f01cc..2628eb4 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -69,7 +69,7 @@
* Density Independent Pixel unit, where one DIP is one pixel on an
* approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen),
* providing the baseline of the system's display. Thus on a 160dpi screen
- * this density value will be 1; on a 106 dpi screen it would be .75; etc.
+ * this density value will be 1; on a 120 dpi screen it would be .75; etc.
*
* <p>This value does not exactly follow the real screen size (as given by
* {@link #xdpi} and {@link #ydpi}, but rather is used to scale the size of
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index bd6e7b4..9058221 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -71,11 +71,6 @@
the slider can be opened (for example, in a pocket or purse). -->
<bool name="config_bypass_keyguard_if_slider_open">true</bool>
- <!-- Flag indicating whether the device supports automatic brightness mode in hardware.
- WARNING - DO NOT USE THIS FEATURE
- Hardware auto brightness support is deprecated and will be removed in the next release. -->
- <bool name="config_hardware_automatic_brightness_available">false</bool>
-
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">false</bool>
diff --git a/docs/html/guide/appendix/api-levels.jd b/docs/html/guide/appendix/api-levels.jd
index 0830032..cebd2d4 100644
--- a/docs/html/guide/appendix/api-levels.jd
+++ b/docs/html/guide/appendix/api-levels.jd
@@ -18,7 +18,7 @@
</ol>
</li>
<li><a href="#provisional">Using a Provisional API Level</a></li>
- <li><a href="#filtering">Filtering the Reference Documentation by API Level</a></li>
+ <li><a href="#filtering">Filtering the Documentation</a></li>
</ol>
<h2>See also</h2>
diff --git a/docs/html/guide/practices/design/responsiveness.jd b/docs/html/guide/practices/design/responsiveness.jd
index ecd743d..1d5a235 100644
--- a/docs/html/guide/practices/design/responsiveness.jd
+++ b/docs/html/guide/practices/design/responsiveness.jd
@@ -80,7 +80,7 @@
event timeout. These same practices should be followed for any other threads
that display UI, as they are also subject to the same timeouts.</p>
-<p>The specific constraint on IntentReciever execution time emphasizes what
+<p>The specific constraint on IntentReceiver execution time emphasizes what
they were meant to do: small, discrete amounts of work in the background such
as saving a setting or registering a Notification. So as with other methods
called in the main thread, applications should avoid potentially long-running
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design.jd b/docs/html/guide/practices/ui_guidelines/icon_design.jd
index 5f0a278..e5a1b5e2 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design.jd
@@ -847,118 +847,118 @@
<tr>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_alarmclock.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_alarmclock.png" alt="Android asset" />
<div class="caption">Alarm Clock</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_browser.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_browser.png" alt="Android asset" />
<div class="caption">Browser</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_calculator.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_calculator.png" alt="Android asset" />
<div class="caption">Calculator</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_calendar.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_calendar.png" alt="Android asset" />
<div class="caption">Calendar</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_video_camera.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_video_camera.png" alt="Android asset" />
<div class="caption">Camcorder</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_camera.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_camera.png" alt="Android asset" />
<div class="caption">Camera</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_contacts.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_contacts.png" alt="Android asset" />
<div class="caption">Contacts</div></td>
</tr>
<tr>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_phone_dialer.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_phone_dialer.png" alt="Android asset" />
<div class="caption">Dialer</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_email_generic.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_email_generic.png" alt="Android asset" />
<div class="caption">Email</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_gallery.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_gallery.png" alt="Android asset" />
<div class="caption">Gallery</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_generic_application.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_generic_application.png" alt="Android asset" />
<div class="caption">Generic application</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_email.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_email.png" alt="Android asset" />
<div class="caption">Gmail</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_google_talk.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_google_talk.png" alt="Android asset" />
<div class="caption">Google Talk</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_IM.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_IM.png" alt="Android asset" />
<div class="caption">IM</div></td>
</tr>
<tr>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_maps.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_maps.png" alt="Android asset" />
<div class="caption">Maps</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_marketplace.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_marketplace.png" alt="Android asset" />
<div class="caption">Market </div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_sms_mms.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_sms_mms.png" alt="Android asset" />
<div class="caption">Messaging </div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_musicplayer_2.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_musicplayer_2.png" alt="Android asset" />
<div class="caption">Music</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_settings.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_settings.png" alt="Android asset" />
<div class="caption">Settings</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_voicedial.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_voicedial.png" alt="Android asset" />
<div class="caption">Voice Dialer</div></td>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_voicesearch.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_voicesearch.png" alt="Android asset" />
<div class="caption">Voice Search</div></td>
</tr>
<tr>
<td class="image-caption-i image-list">
- <img src="/images/icon_design/ic_launcher_youtube.png" alt="Android asset" />
+ <img src="{@docRoot}images/icon_design/ic_launcher_youtube.png" alt="Android asset" />
<div class="caption">YouTube</div></td>
</tr>
</table>
diff --git a/docs/html/guide/publishing/versioning.jd b/docs/html/guide/publishing/versioning.jd
index 8d8b304..0bec658 100644
--- a/docs/html/guide/publishing/versioning.jd
+++ b/docs/html/guide/publishing/versioning.jd
@@ -165,4 +165,4 @@
<p>For more information, see the <a
href="{@docRoot}guide/developing/manifest/uses-sdk-element.html"><code><uses-
sdk></code></a> manifest element documentation and the <a
-href="{@docRoot}guide/appendix/api-levels.htmll">API Levels</a> document.</p>
+href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document.</p>
diff --git a/docs/html/sdk/1.5_r3/upgrading.jd b/docs/html/sdk/1.5_r3/upgrading.jd
index c79b656..f853d25 100644
--- a/docs/html/sdk/1.5_r3/upgrading.jd
+++ b/docs/html/sdk/1.5_r3/upgrading.jd
@@ -187,7 +187,7 @@
<p>If you encounter problems, ensure your ADT is fully uninstalled and then
follow the guide to
-<a href="installingplugin">Installing the ADT Plugin
+<a href="installing.html#installingplugin">Installing the ADT Plugin
for Eclipse</a>.</p>
<h3 id="updateEclipsePrefs">Update your Eclipse SDK Preferences</h3>
diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd
index 66c6bdc..edc77e8 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/sdk/installing.jd
@@ -360,7 +360,7 @@
</ul>
-<h2 id="troubleshooting">Installation Troubleshooting</h2>
+<h2 id="troubleshooting">Troubleshooting</h2>
<h3>Ubuntu Linux Notes</h3>
diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h
index 67c2dd8..26cde38 100644
--- a/include/private/opengles/gl_context.h
+++ b/include/private/opengles/gl_context.h
@@ -32,6 +32,8 @@
#include <GLES/gl.h>
#include <GLES/glext.h>
+struct android_native_buffer_t;
+
namespace android {
const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10;
@@ -602,7 +604,7 @@
copybit_device_t* blitEngine;
int32_t minScale;
int32_t maxScale;
- buffer_handle_t drawSurfaceBuffer;
+ android_native_buffer_t* drawSurfaceBuffer;
};
struct ogles_context_t {
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 2172536..b9c491be 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -93,6 +93,8 @@
void setIndex(int index);
int getIndex() const;
+ void setVerticalStride(uint32_t vstride);
+ uint32_t getVerticalStride() const;
protected:
GraphicBuffer(const Parcel& reply);
diff --git a/libs/audioflinger/AudioPolicyManagerGeneric.cpp b/libs/audioflinger/AudioPolicyManagerGeneric.cpp
index 6323859..8cfc204 100644
--- a/libs/audioflinger/AudioPolicyManagerGeneric.cpp
+++ b/libs/audioflinger/AudioPolicyManagerGeneric.cpp
@@ -459,6 +459,61 @@
return NO_ERROR;
}
+status_t AudioPolicyManagerGeneric::dump(int fd)
+{
+ const size_t SIZE = 256;
+ char buffer[SIZE];
+ String8 result;
+
+ snprintf(buffer, SIZE, "\nAudioPolicyManager Dump: %p\n", this);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Hardware Output: %d\n", mHardwareOutput);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Output devices: %08x\n", mAvailableOutputDevices);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Input devices: %08x\n", mAvailableInputDevices);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Phone state: %d\n", mPhoneState);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Ringer mode: %d\n", mRingerMode);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Force use for communications %d\n", mForceUse[AudioSystem::FOR_COMMUNICATION]);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Force use for media %d\n", mForceUse[AudioSystem::FOR_MEDIA]);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Force use for record %d\n", mForceUse[AudioSystem::FOR_RECORD]);
+ result.append(buffer);
+ write(fd, result.string(), result.size());
+
+ snprintf(buffer, SIZE, "\nOutputs dump:\n");
+ write(fd, buffer, strlen(buffer));
+ for (size_t i = 0; i < mOutputs.size(); i++) {
+ snprintf(buffer, SIZE, "- Output %d dump:\n", mOutputs.keyAt(i));
+ write(fd, buffer, strlen(buffer));
+ mOutputs.valueAt(i)->dump(fd);
+ }
+
+ snprintf(buffer, SIZE, "\nInputs dump:\n");
+ write(fd, buffer, strlen(buffer));
+ for (size_t i = 0; i < mInputs.size(); i++) {
+ snprintf(buffer, SIZE, "- Input %d dump:\n", mInputs.keyAt(i));
+ write(fd, buffer, strlen(buffer));
+ mInputs.valueAt(i)->dump(fd);
+ }
+
+ snprintf(buffer, SIZE, "\nStreams dump:\n");
+ write(fd, buffer, strlen(buffer));
+ snprintf(buffer, SIZE, " Stream Index Min Index Max Index Cur Mute Count Can be muted\n");
+ write(fd, buffer, strlen(buffer));
+ for (size_t i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
+ snprintf(buffer, SIZE, " %02d", i);
+ mStreams[i].dump(buffer + 3, SIZE);
+ write(fd, buffer, strlen(buffer));
+ }
+
+ return NO_ERROR;
+}
+
// ----------------------------------------------------------------------------
// AudioPolicyManagerGeneric
// ----------------------------------------------------------------------------
@@ -815,6 +870,35 @@
return refcount;
}
+status_t AudioPolicyManagerGeneric::AudioOutputDescriptor::dump(int fd)
+{
+ const size_t SIZE = 256;
+ char buffer[SIZE];
+ String8 result;
+
+ snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Format: %d\n", mFormat);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Latency: %d\n", mLatency);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Flags %08x\n", mFlags);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Devices %08x\n", mDevice);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Stream refCount\n");
+ result.append(buffer);
+ for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) {
+ snprintf(buffer, SIZE, " %02d %d\n", i, mRefCount[i]);
+ result.append(buffer);
+ }
+ write(fd, result.string(), result.size());
+
+ return NO_ERROR;
+}
+
// --- AudioInputDescriptor class implementation
AudioPolicyManagerGeneric::AudioInputDescriptor::AudioInputDescriptor()
@@ -823,4 +907,39 @@
{
}
+status_t AudioPolicyManagerGeneric::AudioInputDescriptor::dump(int fd)
+{
+ const size_t SIZE = 256;
+ char buffer[SIZE];
+ String8 result;
+
+ snprintf(buffer, SIZE, " Sampling rate: %d\n", mSamplingRate);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Format: %d\n", mFormat);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Channels: %08x\n", mChannels);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Acoustics %08x\n", mAcoustics);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Devices %08x\n", mDevice);
+ result.append(buffer);
+ snprintf(buffer, SIZE, " Ref Count %d\n", mRefCount);
+ result.append(buffer);
+ write(fd, result.string(), result.size());
+
+ return NO_ERROR;
+}
+
+// --- StreamDescriptor class implementation
+
+void AudioPolicyManagerGeneric::StreamDescriptor::dump(char* buffer, size_t size)
+{
+ snprintf(buffer, size, " %02d %02d %02d %02d %d\n",
+ mIndexMin,
+ mIndexMax,
+ mIndexCur,
+ mMuteCount,
+ mCanBeMuted);
+}
+
}; // namespace android
diff --git a/libs/audioflinger/AudioPolicyManagerGeneric.h b/libs/audioflinger/AudioPolicyManagerGeneric.h
index d904520..4997cdf 100644
--- a/libs/audioflinger/AudioPolicyManagerGeneric.h
+++ b/libs/audioflinger/AudioPolicyManagerGeneric.h
@@ -76,6 +76,8 @@
virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, int index);
virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index);
+ virtual status_t dump(int fd);
+
private:
enum routing_strategy {
@@ -93,6 +95,7 @@
public:
AudioOutputDescriptor();
+ status_t dump(int fd);
uint32_t device();
void changeRefCount(AudioSystem::stream_type, int delta);
@@ -115,6 +118,8 @@
public:
AudioInputDescriptor();
+ status_t dump(int fd);
+
uint32_t mSamplingRate; //
uint32_t mFormat; // input configuration
uint32_t mChannels; //
@@ -130,6 +135,8 @@
StreamDescriptor()
: mIndexMin(0), mIndexMax(1), mIndexCur(1), mMuteCount(0), mCanBeMuted(true) {}
+ void dump(char* buffer, size_t size);
+
int mIndexMin; // min volume index
int mIndexMax; // max volume index
int mIndexCur; // current volume index
diff --git a/libs/audioflinger/AudioPolicyService.cpp b/libs/audioflinger/AudioPolicyService.cpp
index f71c99c..9723697 100644
--- a/libs/audioflinger/AudioPolicyService.cpp
+++ b/libs/audioflinger/AudioPolicyService.cpp
@@ -43,6 +43,12 @@
namespace android {
+static const char* kDeadlockedString = "AudioPolicyService may be deadlocked\n";
+static const char* kCmdDeadlockedString = "AudioPolicyService command thread may be deadlocked\n";
+
+static const int kDumpLockRetries = 50;
+static const int kDumpLockSleep = 20000;
+
static bool checkPermission() {
#ifndef HAVE_ANDROID_OS
return true;
@@ -335,17 +341,65 @@
LOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
}
+static bool tryLock(Mutex& mutex)
+{
+ bool locked = false;
+ for (int i = 0; i < kDumpLockRetries; ++i) {
+ if (mutex.tryLock() == NO_ERROR) {
+ locked = true;
+ break;
+ }
+ usleep(kDumpLockSleep);
+ }
+ return locked;
+}
+
+status_t AudioPolicyService::dumpInternals(int fd)
+{
+ const size_t SIZE = 256;
+ char buffer[SIZE];
+ String8 result;
+
+ snprintf(buffer, SIZE, "PolicyManager Interface: %p\n", mpPolicyManager);
+ result.append(buffer);
+ snprintf(buffer, SIZE, "Command Thread: %p\n", mAudioCommandThread.get());
+ result.append(buffer);
+ snprintf(buffer, SIZE, "Tones Thread: %p\n", mTonePlaybackThread.get());
+ result.append(buffer);
+
+ write(fd, result.string(), result.size());
+ return NO_ERROR;
+}
+
status_t AudioPolicyService::dump(int fd, const Vector<String16>& args)
{
if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
- dumpPermissionDenial(fd, args);
+ dumpPermissionDenial(fd);
} else {
+ bool locked = tryLock(mLock);
+ if (!locked) {
+ String8 result(kDeadlockedString);
+ write(fd, result.string(), result.size());
+ }
+ dumpInternals(fd);
+ if (mAudioCommandThread != NULL) {
+ mAudioCommandThread->dump(fd);
+ }
+ if (mTonePlaybackThread != NULL) {
+ mTonePlaybackThread->dump(fd);
+ }
+
+ if (mpPolicyManager) {
+ mpPolicyManager->dump(fd);
+ }
+
+ if (locked) mLock.unlock();
}
return NO_ERROR;
}
-status_t AudioPolicyService::dumpPermissionDenial(int fd, const Vector<String16>& args)
+status_t AudioPolicyService::dumpPermissionDenial(int fd)
{
const size_t SIZE = 256;
char buffer[SIZE];
@@ -609,6 +663,36 @@
return false;
}
+status_t AudioPolicyService::AudioCommandThread::dump(int fd)
+{
+ const size_t SIZE = 256;
+ char buffer[SIZE];
+ String8 result;
+
+ snprintf(buffer, SIZE, "AudioCommandThread %p Dump\n", this);
+ result.append(buffer);
+ write(fd, result.string(), result.size());
+
+ bool locked = tryLock(mLock);
+ if (!locked) {
+ String8 result2(kCmdDeadlockedString);
+ write(fd, result2.string(), result2.size());
+ }
+
+ snprintf(buffer, SIZE, "- Commands:\n");
+ result = String8(buffer);
+ result.append(" Command Time Status Wait pParam\n");
+ for (int i = 0; i < (int)mAudioCommands.size(); i++) {
+ mAudioCommands[i]->dump(buffer, SIZE);
+ result.append(buffer);
+ }
+ write(fd, result.string(), result.size());
+
+ if (locked) mLock.unlock();
+
+ return NO_ERROR;
+}
+
void AudioPolicyService::AudioCommandThread::startToneCommand(int type, int stream)
{
AudioCommand *command = new AudioCommand();
@@ -808,4 +892,15 @@
requestExitAndWait();
}
+void AudioPolicyService::AudioCommandThread::AudioCommand::dump(char* buffer, size_t size)
+{
+ snprintf(buffer, size, " %02d %06d.%03d %03d %01u %p\n",
+ mCommand,
+ (int)ns2s(mTime),
+ (int)ns2ms(mTime)%1000,
+ mStatus,
+ mWaitStatus,
+ mParam);
+}
+
}; // namespace android
diff --git a/libs/audioflinger/AudioPolicyService.h b/libs/audioflinger/AudioPolicyService.h
index 11a1214..7c1bb85 100644
--- a/libs/audioflinger/AudioPolicyService.h
+++ b/libs/audioflinger/AudioPolicyService.h
@@ -111,6 +111,8 @@
AudioPolicyService();
virtual ~AudioPolicyService();
+ status_t dumpInternals(int fd);
+
// Thread used for tone playback and to send audio config commands to audio flinger
// For tone playback, using a separate thread is necessary to avoid deadlock with mLock because startTone()
// and stopTone() are normally called with mLock locked and requesting a tone start or stop will cause
@@ -133,6 +135,8 @@
AudioCommandThread ();
virtual ~AudioCommandThread();
+ status_t dump(int fd);
+
// Thread virtuals
virtual void onFirstRef();
virtual bool threadLoop();
@@ -149,6 +153,8 @@
// descriptor for requested tone playback event
class AudioCommand {
public:
+ void dump(char* buffer, size_t size);
+
int mCommand; // START_TONE, STOP_TONE ...
nsecs_t mTime; // time stamp
Condition mCond; // condition for status return
@@ -188,7 +194,7 @@
};
// Internal dump utilities.
- status_t dumpPermissionDenial(int fd, const Vector<String16>& args);
+ status_t dumpPermissionDenial(int fd);
Mutex mLock; // prevents concurrent access to AudioPolicy manager functions changing device
diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp
index 3806a42..c660947 100644
--- a/libs/binder/MemoryHeapPmem.cpp
+++ b/libs/binder/MemoryHeapPmem.cpp
@@ -132,7 +132,7 @@
char const * const device = pmemHeap->getDevice();
#if HAVE_ANDROID_OS
if (device) {
- int fd = open(device, O_RDWR);
+ int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0));
LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
if (fd >= 0) {
int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index 82a8e51..a36304c 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -444,6 +444,8 @@
GraphicBuffer::USAGE_HW_TEXTURE,
src.img.w, src.img.handle, false);
+ graphicBuffer->setVerticalStride(src.img.h);
+
err = mLayer.initializeEglImage(graphicBuffer, &mTexture);
}
#endif
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index efe2d78..6a5c8a9 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -226,6 +226,14 @@
return mIndex;
}
+void GraphicBuffer::setVerticalStride(uint32_t vstride) {
+ mVStride = vstride;
+}
+
+uint32_t GraphicBuffer::getVerticalStride() const {
+ return mVStride;
+}
+
// ---------------------------------------------------------------------------
}; // namespace android
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
index fa0986a..e66e560 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/CameraTest.java
@@ -226,7 +226,8 @@
* Test case 1: Take a picture and verify all the callback
* functions are called properly.
*/
- @LargeTest
+ // TODO: add this back to LargeTest once bug 2141755 is fixed
+ // @LargeTest
public void testTakePicture() throws Exception {
synchronized (lock) {
initializeMessageLooper();
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java
index d2809c1..ddf5e0b 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMimeTest.java
@@ -83,7 +83,8 @@
assertMediaPlaybackActivityHandles("audio/*");
}
- @MediumTest
+ // TODO: temporarily remove from medium suite because it hangs whole suite
+ // @MediumTest
// Checks the MediaPlaybackActivity handles application/itunes. Some servers
// set the Content-type header to application/iTunes (with capital T, but
// the download manager downcasts it) for their MP3 podcasts. This is non
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
index 9927edaa..8750098 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
@@ -22,6 +22,7 @@
import java.io.FileOutputStream;
import android.test.AndroidTestCase;
import com.android.mediaframeworktest.MediaNames;
+import com.android.mediaframeworktest.MediaProfileReader;
import android.test.suitebuilder.annotation.*;
/**
@@ -38,10 +39,19 @@
public static void testAlbumArt() throws Exception {
Log.v(TAG, "testAlbumArt starts.");
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+ MediaProfileReader reader = new MediaProfileReader();
+ boolean supportWMA = reader.getWMAEnable();
+ boolean supportWMV = reader.getWMVEnable();
retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY);
for (int i = 0, n = MediaNames.ALBUMART_TEST_FILES.length; i < n; ++i) {
try {
Log.v(TAG, "File " + i + ": " + MediaNames.ALBUMART_TEST_FILES[i]);
+ if ((MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wma") && !supportWMA) ||
+ (MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wmv") && !supportWMV)
+ ) {
+ Log.v(TAG, "windows media is not supported and thus we will skip the test for this file");
+ continue;
+ }
retriever.setDataSource(MediaNames.ALBUMART_TEST_FILES[i]);
byte[] albumArt = retriever.extractAlbumArt();
@@ -64,11 +74,20 @@
@LargeTest
public static void testThumbnailCapture() throws Exception {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+ MediaProfileReader reader = new MediaProfileReader();
+ boolean supportWMA = reader.getWMAEnable();
+ boolean supportWMV = reader.getWMVEnable();
Log.v(TAG, "Thumbnail processing starts");
long startedAt = System.currentTimeMillis();
for(int i = 0, n = MediaNames.THUMBNAIL_CAPTURE_TEST_FILES.length; i < n; ++i) {
try {
Log.v(TAG, "File " + i + ": " + MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i]);
+ if ((MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i].endsWith(".wma") && !supportWMA) ||
+ (MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i].endsWith(".wmv") && !supportWMV)
+ ) {
+ Log.v(TAG, "windows media is not supported and thus we will skip the test for this file");
+ continue;
+ }
retriever.setDataSource(MediaNames.THUMBNAIL_CAPTURE_TEST_FILES[i]);
Bitmap bitmap = retriever.captureFrame();
assertTrue(bitmap != null);
@@ -91,10 +110,20 @@
@LargeTest
public static void testMetadataRetrieval() throws Exception {
+ MediaProfileReader reader = new MediaProfileReader();
+ boolean supportWMA = reader.getWMAEnable();
+ boolean supportWMV = reader.getWMVEnable();
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY);
for(int i = 0, n = MediaNames.METADATA_RETRIEVAL_TEST_FILES.length; i < n; ++i) {
try {
+ Log.v(TAG, "File " + i + ": " + MediaNames.METADATA_RETRIEVAL_TEST_FILES[i]);
+ if ((MediaNames.METADATA_RETRIEVAL_TEST_FILES[i].endsWith(".wma") && !supportWMA) ||
+ (MediaNames.METADATA_RETRIEVAL_TEST_FILES[i].endsWith(".wmv") && !supportWMV)
+ ) {
+ Log.v(TAG, "windows media is not supported and thus we will skip the test for this file");
+ continue;
+ }
retriever.setDataSource(MediaNames.METADATA_RETRIEVAL_TEST_FILES[i]);
extractAllSupportedMetadataValues(retriever);
} catch(Exception e) {
diff --git a/opengl/libagl/copybit.cpp b/opengl/libagl/copybit.cpp
index 3de5b2b..1bef859 100644
--- a/opengl/libagl/copybit.cpp
+++ b/opengl/libagl/copybit.cpp
@@ -46,13 +46,24 @@
static void textureToCopyBitImage(
const GGLSurface* surface, int32_t opFormat,
- buffer_handle_t buffer, copybit_image_t* img)
+ android_native_buffer_t* buffer, copybit_image_t* img)
{
+ uint32_t vstride = 0;
+ if (opFormat == COPYBIT_FORMAT_YCbCr_422_SP ||
+ opFormat == COPYBIT_FORMAT_YCbCr_420_SP) {
+ // NOTE: this static_cast is really not safe b/c we can't know for
+ // sure the buffer passed is of the right type.
+ // However, since we do this only for YUV formats, we should be safe
+ // since only SurfaceFlinger makes use of them.
+ GraphicBuffer* graphicBuffer = static_cast<GraphicBuffer*>(buffer);
+ vstride = graphicBuffer->getVerticalStride();
+ }
+
img->w = surface->stride;
- img->h = surface->height;
+ img->h = vstride ? vstride : surface->height;
img->format = opFormat;
img->base = surface->data;
- img->handle = (native_handle_t *)buffer;
+ img->handle = (native_handle_t *)buffer->handle;
}
struct clipRectRegion : public copybit_region_t {
@@ -279,8 +290,8 @@
copybit_device_t* copybit = c->copybits.blitEngine;
copybit_image_t src;
- buffer_handle_t source_hnd = textureObject->buffer->handle;
- textureToCopyBitImage(&textureObject->surface, opFormat, source_hnd, &src);
+ textureToCopyBitImage(&textureObject->surface, opFormat,
+ textureObject->buffer, &src);
copybit_rect_t srect = { Ucr, Vcr + Hcr, Ucr + Wcr, Vcr };
/*
@@ -360,8 +371,8 @@
}
copybit_image_t dst;
- buffer_handle_t target_hnd = c->copybits.drawSurfaceBuffer;
- textureToCopyBitImage(&cbSurface, cbSurface.format, target_hnd, &dst);
+ textureToCopyBitImage(&cbSurface, cbSurface.format,
+ c->copybits.drawSurfaceBuffer, &dst);
copybit_rect_t drect = {x, y, x+w, y+h};
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index d04900e..80ddc02 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -651,7 +651,7 @@
if (supportedCopybitsDestinationFormat(buffer.format)) {
buffer_handle_t handle = this->buffer->handle;
if (handle != NULL) {
- gl->copybits.drawSurfaceBuffer = handle;
+ gl->copybits.drawSurfaceBuffer = this->buffer;
}
}
}
diff --git a/services/java/com/android/server/HardwareService.java b/services/java/com/android/server/HardwareService.java
index 7c56a30..b1d58ce 100755
--- a/services/java/com/android/server/HardwareService.java
+++ b/services/java/com/android/server/HardwareService.java
@@ -59,8 +59,6 @@
private boolean mAttentionLightOn;
private boolean mPulsing;
- private boolean mAutoBrightnessAvailable;
-
private class Vibration implements IBinder.DeathRecipient {
private final IBinder mToken;
private final long mTimeout;
@@ -131,9 +129,6 @@
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
context.registerReceiver(mIntentReceiver, filter);
-
- mAutoBrightnessAvailable = context.getResources().getBoolean(
- com.android.internal.R.bool.config_hardware_automatic_brightness_available);
}
protected void finalize() throws Throwable {
@@ -287,12 +282,6 @@
setLight_native(mNativePointer, light, color, mode, onMS, offMS);
}
- void setAutoBrightness_UNCHECKED(boolean on) {
- if (mAutoBrightnessAvailable) {
- setAutoBrightness_native(mNativePointer, on);
- }
- }
-
public void setAttentionLight(boolean on) {
// Not worthy of a permission. We shouldn't have a flashlight permission.
synchronized (this) {
@@ -493,7 +482,6 @@
private static native int init_native();
private static native void finalize_native(int ptr);
- private static native void setAutoBrightness_native(int ptr, boolean automatic);
private static native void setLight_native(int ptr, int light, int color, int mode,
int onMS, int offMS);
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 8a7c28f..f75f7195 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -218,12 +218,6 @@
private int[] mButtonBacklightValues;
private int[] mKeyboardBacklightValues;
- /*
- * WARNING - DO NOT USE THE HARDWARE AUTO-BRIGHTNESS FEATURE
- * Hardware auto brightness support is deprecated and will be removed in the next release.
- */
- private boolean mUseHardwareAutoBrightness;
-
// Used when logging number and duration of touch-down cycles
private long mTotalTouchDownTime;
private long mLastTouchDown;
@@ -448,17 +442,6 @@
// read settings for auto-brightness
mUseSoftwareAutoBrightness = resources.getBoolean(
com.android.internal.R.bool.config_automatic_brightness_available);
-
- /*
- * WARNING - DO NOT USE THE HARDWARE AUTO-BRIGHTNESS FEATURE
- * Hardware auto brightness support is deprecated and will be removed in the next release.
- */
- mUseHardwareAutoBrightness = resources.getBoolean(
- com.android.internal.R.bool.config_hardware_automatic_brightness_available);
- if (mUseHardwareAutoBrightness) {
- mUseSoftwareAutoBrightness = false;
- }
-
if (mUseSoftwareAutoBrightness) {
mAutoBrightnessLevels = resources.getIntArray(
com.android.internal.R.array.config_autoBrightnessLevels);
@@ -906,7 +889,6 @@
pw.println(" mLightSensorEnabled=" + mLightSensorEnabled);
pw.println(" mLightSensorValue=" + mLightSensorValue);
pw.println(" mLightSensorPendingValue=" + mLightSensorPendingValue);
- pw.println(" mUseHardwareAutoBrightness=" + mUseHardwareAutoBrightness);
pw.println(" mUseSoftwareAutoBrightness=" + mUseSoftwareAutoBrightness);
pw.println(" mAutoBrightessEnabled=" + mAutoBrightessEnabled);
mScreenBrightness.dump(pw, " mScreenBrightness: ");
@@ -2086,16 +2068,9 @@
private void setScreenBrightnessMode(int mode) {
boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
- if (mAutoBrightessEnabled != enabled) {
+ if (mUseSoftwareAutoBrightness && mAutoBrightessEnabled != enabled) {
mAutoBrightessEnabled = enabled;
-
- if (mUseHardwareAutoBrightness) {
- // When setting auto-brightness, must reset the brightness afterwards
- mHardware.setAutoBrightness_UNCHECKED(enabled);
- if (screenIsOn()) {
- setBacklightBrightness((int)mScreenBrightness.curValue);
- }
- } else if (mUseSoftwareAutoBrightness && screenIsOn()) {
+ if (screenIsOn()) {
// force recompute of backlight values
if (mLightSensorValue >= 0) {
int value = (int)mLightSensorValue;
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java
index 8dded1a..bd7b471 100644
--- a/services/java/com/android/server/status/StatusBarService.java
+++ b/services/java/com/android/server/status/StatusBarService.java
@@ -692,6 +692,7 @@
mTicker.addEntry(n, StatusBarIcon.getIcon(mContext, data), n.tickerText);
}
}
+ updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
}
// icon
@@ -1562,15 +1563,24 @@
+ " mTrackingPosition=" + mTrackingPosition);
}
- // If the expanded view is not visible, there is no reason to do
- // any work.
- if (!mExpandedVisible) {
- return;
- }
-
- // tracking view...
int h = mStatusBarView.getHeight();
int disph = mDisplay.getHeight();
+
+ // If the expanded view is not visible, make sure they're still off screen.
+ // Maybe the view was resized.
+ if (!mExpandedVisible) {
+ if (mTrackingView != null) {
+ mTrackingPosition = mTrackingParams.y = -disph;
+ WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
+ }
+ if (mExpandedParams != null) {
+ mExpandedParams.y = -disph;
+ mExpandedDialog.getWindow().setAttributes(mExpandedParams);
+ }
+ return;
+ }
+
+ // tracking view...
int pos;
if (expandedPosition == EXPANDED_FULL_OPEN) {
pos = h;
@@ -1681,7 +1691,7 @@
private View.OnClickListener mClearButtonListener = new View.OnClickListener() {
public void onClick(View v) {
mNotificationCallbacks.onClearAll();
- performCollapse();
+ addPendingOp(OP_EXPAND, null, false);
}
};
diff --git a/services/jni/com_android_server_HardwareService.cpp b/services/jni/com_android_server_HardwareService.cpp
index a17e29f..22d4bd8 100644
--- a/services/jni/com_android_server_HardwareService.cpp
+++ b/services/jni/com_android_server_HardwareService.cpp
@@ -100,18 +100,6 @@
free(devices);
}
-static void setAutoBrightness_native(JNIEnv *env, jobject clazz, int ptr,
- jboolean automatic)
-{
- Devices* devices = (Devices*)ptr;
-
- if (devices->lights[LIGHT_INDEX_BACKLIGHT] == NULL) {
- return;
- }
-
- devices->lights[LIGHT_INDEX_BACKLIGHT]->set_als_mode(automatic ? 0 : 1);
-}
-
static void setLight_native(JNIEnv *env, jobject clazz, int ptr,
int light, int colorARGB, int flashMode, int onMS, int offMS)
{
@@ -146,7 +134,6 @@
static JNINativeMethod method_table[] = {
{ "init_native", "()I", (void*)init_native },
{ "finalize_native", "(I)V", (void*)finalize_native },
- { "setAutoBrightness_native", "(IZ)V", (void*)setAutoBrightness_native },
{ "setLight_native", "(IIIIII)V", (void*)setLight_native },
{ "vibratorOn", "(J)V", (void*)vibratorOn },
{ "vibratorOff", "()V", (void*)vibratorOff }