Merge change 25296 into eclair
* changes:
Add new Gservices setting for discarding uphill ops for eclair and future devices.
diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java
index 666efae..cc48aeb 100644
--- a/core/java/android/preference/DialogPreference.java
+++ b/core/java/android/preference/DialogPreference.java
@@ -31,6 +31,9 @@
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
/**
@@ -297,10 +300,32 @@
if (state != null) {
dialog.onRestoreInstanceState(state);
}
+ if (needInputMethod()) {
+ requestInputMethod(dialog);
+ }
dialog.setOnDismissListener(this);
dialog.show();
}
-
+
+ /**
+ * Returns whether the preference needs to display a soft input method when the dialog
+ * is displayed. Default is false. Subclasses should override this method if they need
+ * the soft input method brought up automatically.
+ * @hide
+ */
+ protected boolean needInputMethod() {
+ return false;
+ }
+
+ /**
+ * Sets the required flags on the dialog window to enable input method window to show up.
+ */
+ private void requestInputMethod(Dialog dialog) {
+ Window window = dialog.getWindow();
+ window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE |
+ WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+ }
+
/**
* Creates the content view for the dialog (if a custom content view is
* required). By default, it inflates the dialog layout resource if it is
diff --git a/core/java/android/preference/EditTextPreference.java b/core/java/android/preference/EditTextPreference.java
index a12704f..84ee950 100644
--- a/core/java/android/preference/EditTextPreference.java
+++ b/core/java/android/preference/EditTextPreference.java
@@ -169,6 +169,13 @@
return mEditText;
}
+ /** @hide */
+ @Override
+ protected boolean needInputMethod() {
+ // We want the input method to show, if possible, when dialog is displayed
+ return true;
+ }
+
@Override
protected Parcelable onSaveInstanceState() {
final Parcelable superState = super.onSaveInstanceState();
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index b84a0d9..b710acb6 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -70,8 +70,13 @@
<!-- The number of degrees to rotate the display when the keyboard is open. -->
<integer name="config_lidOpenRotation">90</integer>
- <!-- The number of degrees to rotate the display when the device is in a dock. -->
- <integer name="config_dockedRotation">90</integer>
+ <!-- The number of degrees to rotate the display when the device is in a desk dock.
+ A value of -1 means no change in orientation by default. -->
+ <integer name="config_deskDockRotation">-1</integer>
+
+ <!-- The number of degrees to rotate the display when the device is in a car dock.
+ A value of -1 means no change in orientation by default. -->
+ <integer name="config_carDockRotation">-1</integer>
<!-- Indicate whether the lid state impacts the accessibility of
the physical keyboard. 0 means it doesn't, 1 means it is accessible
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index 4f7500f..add358b 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -2069,7 +2069,7 @@
}
}
-AudioFlinger::PlaybackThread::TrackBase::~TrackBase()
+AudioFlinger::ThreadBase::TrackBase::~TrackBase()
{
if (mCblk) {
mCblk->~audio_track_cblk_t(); // destroy our shared-structure.
@@ -2081,7 +2081,7 @@
mClient.clear();
}
-void AudioFlinger::PlaybackThread::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
+void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
{
buffer->raw = 0;
mFrameCount = buffer->frameCount;
@@ -2089,7 +2089,7 @@
buffer->frameCount = 0;
}
-bool AudioFlinger::PlaybackThread::TrackBase::step() {
+bool AudioFlinger::ThreadBase::TrackBase::step() {
bool result;
audio_track_cblk_t* cblk = this->cblk();
@@ -2101,7 +2101,7 @@
return result;
}
-void AudioFlinger::PlaybackThread::TrackBase::reset() {
+void AudioFlinger::ThreadBase::TrackBase::reset() {
audio_track_cblk_t* cblk = this->cblk();
cblk->user = 0;
@@ -2112,20 +2112,20 @@
LOGV("TrackBase::reset");
}
-sp<IMemory> AudioFlinger::PlaybackThread::TrackBase::getCblk() const
+sp<IMemory> AudioFlinger::ThreadBase::TrackBase::getCblk() const
{
return mCblkMemory;
}
-int AudioFlinger::PlaybackThread::TrackBase::sampleRate() const {
+int AudioFlinger::ThreadBase::TrackBase::sampleRate() const {
return (int)mCblk->sampleRate;
}
-int AudioFlinger::PlaybackThread::TrackBase::channelCount() const {
+int AudioFlinger::ThreadBase::TrackBase::channelCount() const {
return (int)mCblk->channels;
}
-void* AudioFlinger::PlaybackThread::TrackBase::getBuffer(uint32_t offset, uint32_t frames) const {
+void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t frames) const {
audio_track_cblk_t* cblk = this->cblk();
int8_t *bufferStart = (int8_t *)mBuffer + (offset-cblk->serverBase)*cblk->frameSize;
int8_t *bufferEnd = bufferStart + frames * cblk->frameSize;
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 31bf94a..73b6483 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -153,7 +153,7 @@
/**
* Save the tag data into the JPEG file. This is expensive because it involves
* copying all the JPG data from one file to another and deleting the old file
- * and renaming the other. It's best to use {@link setAttribute(String,String)} to set all
+ * and renaming the other. It's best to use {@link #setAttribute(String,String)} to set all
* attributes to write and make a single call rather than multiple calls for
* each attribute.
*/