summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/webkit/WebView.java31
-rw-r--r--core/res/res/drawable-hdpi/stat_notify_chat.pngbin921 -> 921 bytes
-rw-r--r--core/res/res/drawable-mdpi/stat_notify_chat.pngbin657 -> 657 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/stat_notify_chat.pngbin3852 -> 921 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/stat_notify_disk_full.pngbin3361 -> 753 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/stat_notify_email_generic.pngbin2488 -> 529 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/stat_notify_error.pngbin2877 -> 610 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/stat_notify_gmail.pngbin2322 -> 597 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/stat_notify_chat.pngbin2312 -> 657 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/stat_notify_disk_full.pngbin2039 -> 561 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/stat_notify_email_generic.pngbin1565 -> 455 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/stat_notify_error.pngbin1838 -> 458 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/stat_notify_gmail.pngbin1531 -> 480 bytes
-rw-r--r--graphics/java/android/graphics/Paint.java2
-rw-r--r--graphics/java/android/graphics/SurfaceTexture.java11
-rw-r--r--media/libstagefright/AwesomePlayer.cpp13
-rw-r--r--media/libstagefright/rtsp/ASessionDescription.cpp52
-rw-r--r--media/libstagefright/rtsp/ASessionDescription.h8
-rw-r--r--media/libstagefright/rtsp/MyHandler.h6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java8
-rwxr-xr-xtelephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java2
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java3
22 files changed, 85 insertions, 51 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index e26fd6f19d4c..790a04023330 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -350,6 +350,7 @@ public class WebView extends AbsoluteLayout
private ZoomManager mZoomManager;
private Rect mGLRectViewport = new Rect();
+ private boolean mGLViewportEmpty = false;
/**
* Transportation object for returning WebView across thread boundaries.
@@ -4075,7 +4076,8 @@ public class WebView extends AbsoluteLayout
}
if (canvas.isHardwareAccelerated()) {
- int functor = nativeGetDrawGLFunction(mGLRectViewport, getScale(), extras);
+ int functor = nativeGetDrawGLFunction(mGLViewportEmpty ? null : mGLRectViewport,
+ getScale(), extras);
((HardwareCanvas) canvas).callDrawGLFunction(functor);
} else {
DrawFilter df = null;
@@ -5159,16 +5161,21 @@ public class WebView extends AbsoluteLayout
void setGLRectViewport() {
// Use the getGlobalVisibleRect() to get the intersection among the parents
- getGlobalVisibleRect(mGLRectViewport);
-
- // Then need to invert the Y axis, just for GL
- View rootView = getRootView();
- int rootViewHeight = rootView.getHeight();
- int savedWebViewBottom = mGLRectViewport.bottom;
- mGLRectViewport.bottom = rootViewHeight - mGLRectViewport.top - getVisibleTitleHeight();
- mGLRectViewport.top = rootViewHeight - savedWebViewBottom;
-
- nativeUpdateDrawGLFunction(mGLRectViewport);
+ // visible == false means we're clipped - send a null rect down to indicate that
+ // we should not draw
+ boolean visible = getGlobalVisibleRect(mGLRectViewport);
+ if (visible) {
+ // Then need to invert the Y axis, just for GL
+ View rootView = getRootView();
+ int rootViewHeight = rootView.getHeight();
+ int savedWebViewBottom = mGLRectViewport.bottom;
+ mGLRectViewport.bottom = rootViewHeight - mGLRectViewport.top - getVisibleTitleHeight();
+ mGLRectViewport.top = rootViewHeight - savedWebViewBottom;
+ mGLViewportEmpty = false;
+ } else {
+ mGLViewportEmpty = true;
+ }
+ nativeUpdateDrawGLFunction(mGLViewportEmpty ? null : mGLRectViewport);
}
/**
@@ -6828,7 +6835,7 @@ public class WebView extends AbsoluteLayout
previouslyFocusedRect);
} else {
result = super.requestFocus(direction, previouslyFocusedRect);
- if (mWebViewCore.getSettings().getNeedInitialFocus()) {
+ if (mWebViewCore.getSettings().getNeedInitialFocus() && !isInTouchMode()) {
// For cases such as GMail, where we gain focus from a direction,
// we want to move to the first available link.
// FIXME: If there are no visible links, we may not want to
diff --git a/core/res/res/drawable-hdpi/stat_notify_chat.png b/core/res/res/drawable-hdpi/stat_notify_chat.png
index b2e65c627380..9c713c8f2738 100644
--- a/core/res/res/drawable-hdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-hdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_chat.png b/core/res/res/drawable-mdpi/stat_notify_chat.png
index f98b032bcc4b..91b429008ef6 100644
--- a/core/res/res/drawable-mdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-mdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_notify_chat.png b/core/res/res/drawable-xlarge-hdpi/stat_notify_chat.png
index e936faceda63..8cc5535c21e1 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_notify_disk_full.png b/core/res/res/drawable-xlarge-hdpi/stat_notify_disk_full.png
index eb626df39878..4441ba20b86a 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_notify_email_generic.png b/core/res/res/drawable-xlarge-hdpi/stat_notify_email_generic.png
index d6bc7d30cddb..73891a387641 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_notify_error.png b/core/res/res/drawable-xlarge-hdpi/stat_notify_error.png
index 8c8f25dbc171..db68eeae3357 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_notify_error.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_notify_gmail.png b/core/res/res/drawable-xlarge-hdpi/stat_notify_gmail.png
index 661cc2ff47b8..7af6921a84f1 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_notify_chat.png b/core/res/res/drawable-xlarge-mdpi/stat_notify_chat.png
index b2d71862c8cc..22adc672d9d2 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_notify_disk_full.png b/core/res/res/drawable-xlarge-mdpi/stat_notify_disk_full.png
index 36ab1ff76f47..c434d12449bf 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_notify_email_generic.png b/core/res/res/drawable-xlarge-mdpi/stat_notify_email_generic.png
index a14b3c7d0e7c..daf3b84fb413 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_notify_error.png b/core/res/res/drawable-xlarge-mdpi/stat_notify_error.png
index 81a66c112876..7b097b157d10 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_notify_error.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_notify_gmail.png b/core/res/res/drawable-xlarge-mdpi/stat_notify_gmail.png
index a286ac611169..8daef7cbbe08 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_notify_gmail.png
Binary files differ
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index b739d838ca9d..d8a7f9d57c7a 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -1690,7 +1690,7 @@ public class Paint {
int contextLen = contextEnd - contextStart;
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
- int result = getTextRunCursor(buf, 0, contextLen, flags, offset, cursorOpt);
+ int result = getTextRunCursor(buf, 0, contextLen, flags, offset - contextStart, cursorOpt);
TemporaryBuffer.recycle(buf);
return result;
}
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java
index 64c209a38801..4c659d4dc98c 100644
--- a/graphics/java/android/graphics/SurfaceTexture.java
+++ b/graphics/java/android/graphics/SurfaceTexture.java
@@ -24,9 +24,9 @@ import android.os.Message;
/**
* Captures frames from an image stream as an OpenGL ES texture.
*
- * <p>The image stream may come from either video playback or camera preview. A SurfaceTexture may
- * be used in place of a SurfaceHolder when specifying the output destination of a MediaPlayer or
- * Camera object. This will cause all the frames from that image stream to be sent to the
+ * <p>The image stream may come from either camera preview. A SurfaceTexture may be used in place
+ * of a SurfaceHolder when specifying the output destination of a {@link android.hardware.Camera}
+ * object. Doing so will cause all the frames from the image stream to be sent to the
* SurfaceTexture object rather than to the device's display. When {@link #updateTexImage} is
* called, the contents of the texture object specified when the SurfaceTexture was created is
* updated to contain the most recent image from the image stream. This may cause some frames of
@@ -34,6 +34,11 @@ import android.os.Message;
*
* <p>The texture object uses the GL_TEXTURE_EXTERNAL_OES texture target, which is defined by the
* OES_EGL_image_external OpenGL ES extension. This limits how the texture may be used.
+ *
+ * <p>SurfaceTexture objects may be created on any thread. {@link #updateTexImage} may only be
+ * called on the thread with the OpenGL ES context that contains the texture object. The
+ * frame-available callback is called on an arbitrary thread, so unless special care is taken {@link
+ * #updateTexImage} should not be called directly from the callback.
*/
public class SurfaceTexture {
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 11ac56ce296e..89b3dab46d73 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -378,14 +378,11 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
}
void AwesomePlayer::reset() {
- LOGI("reset");
-
Mutex::Autolock autoLock(mLock);
reset_l();
}
void AwesomePlayer::reset_l() {
- LOGI("reset_l");
mDisplayWidth = 0;
mDisplayHeight = 0;
@@ -411,10 +408,6 @@ void AwesomePlayer::reset_l() {
}
}
- if (mFlags & PREPARING) {
- LOGI("waiting until preparation is completes.");
- }
-
while (mFlags & PREPARING) {
mPreparedCondition.wait(mLock);
}
@@ -438,8 +431,6 @@ void AwesomePlayer::reset_l() {
}
mAudioSource.clear();
- LOGI("audio source cleared");
-
mTimeSource = NULL;
delete mAudioPlayer;
@@ -480,8 +471,6 @@ void AwesomePlayer::reset_l() {
IPCThreadState::self()->flushCommands();
}
- LOGI("video source cleared");
-
mDurationUs = -1;
mFlags = 0;
mExtractorFlags = 0;
@@ -498,8 +487,6 @@ void AwesomePlayer::reset_l() {
mFileSource.clear();
mBitrate = -1;
-
- LOGI("reset_l completed");
}
void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp
index 77917b3a793d..3e710dc4a7b3 100644
--- a/media/libstagefright/rtsp/ASessionDescription.cpp
+++ b/media/libstagefright/rtsp/ASessionDescription.cpp
@@ -254,26 +254,12 @@ bool ASessionDescription::getDurationUs(int64_t *durationUs) const {
return false;
}
- if (value == "npt=now-" || value == "npt=0-") {
- return false;
- }
-
if (strncmp(value.c_str(), "npt=", 4)) {
return false;
}
- const char *s = value.c_str() + 4;
- char *end;
- double from = strtod(s, &end);
-
- if (end == s || *end != '-') {
- return false;
- }
-
- s = end + 1;
- double to = strtod(s, &end);
-
- if (end == s || *end != '\0' || to < from) {
+ float from, to;
+ if (!parseNTPRange(value.c_str() + 4, &from, &to)) {
return false;
}
@@ -307,5 +293,39 @@ void ASessionDescription::ParseFormatDesc(
}
}
+// static
+bool ASessionDescription::parseNTPRange(
+ const char *s, float *npt1, float *npt2) {
+ if (s[0] == '-') {
+ return false; // no start time available.
+ }
+
+ if (!strncmp("now", s, 3)) {
+ return false; // no absolute start time available
+ }
+
+ char *end;
+ *npt1 = strtof(s, &end);
+
+ if (end == s || *end != '-') {
+ // Failed to parse float or trailing "dash".
+ return false;
+ }
+
+ s = end + 1; // skip the dash.
+
+ if (!strncmp("now", s, 3)) {
+ return false; // no absolute end time available
+ }
+
+ *npt2 = strtof(s, &end);
+
+ if (end == s || *end != '\0') {
+ return false;
+ }
+
+ return *npt2 > *npt1;
+}
+
} // namespace android
diff --git a/media/libstagefright/rtsp/ASessionDescription.h b/media/libstagefright/rtsp/ASessionDescription.h
index a3fa79ed5a00..b4629834b68d 100644
--- a/media/libstagefright/rtsp/ASessionDescription.h
+++ b/media/libstagefright/rtsp/ASessionDescription.h
@@ -55,6 +55,14 @@ struct ASessionDescription : public RefBase {
bool findAttribute(size_t index, const char *key, AString *value) const;
+ // parses strings of the form
+ // npt := npt-time "-" npt-time? | "-" npt-time
+ // npt-time := "now" | [0-9]+("." [0-9]*)?
+ //
+ // Returns true iff both "npt1" and "npt2" times were available,
+ // i.e. we have a fixed duration, otherwise this is live streaming.
+ static bool parseNTPRange(const char *s, float *npt1, float *npt2);
+
protected:
virtual ~ASessionDescription();
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index 9bb8c46453b0..306a9c1c260b 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -938,13 +938,11 @@ struct MyHandler : public AHandler {
AString val;
CHECK(GetAttribute(range.c_str(), "npt", &val));
- float npt1, npt2;
- if (val == "now-" || val == "0-") {
+ float npt1, npt2;
+ if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) {
// This is a live stream and therefore not seekable.
return;
- } else {
- CHECK_EQ(sscanf(val.c_str(), "%f-%f", &npt1, &npt2), 2);
}
i = response->mHeaders.indexOfKey("rtp-info");
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 14a2f90acbfe..eaa5cc9d34fe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -97,8 +97,6 @@ public class TabletStatusBar extends StatusBar implements
// Fitts' Law assistance for LatinIME; TODO: replace with a more general approach
private static final boolean FAKE_SPACE_BAR = true;
- public static final int LIGHTS_ON_DELAY = 5000;
-
// The height of the bar, as definied by the build. It may be taller if we're plugged
// into hdmi.
int mNaturalBarHeight = -1;
@@ -391,6 +389,12 @@ public class TabletStatusBar extends StatusBar implements
new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ // even though setting the systemUI visibility below will turn these views
+ // on, we need them to come up faster so that they can catch this motion
+ // event
+ mShadow.setVisibility(View.GONE);
+ mBarContents.setVisibility(View.VISIBLE);
+
try {
mBarService.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);
} catch (RemoteException ex) {
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 19e7faeaeb88..a7f786664fec 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -1069,6 +1069,8 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
cdmaDataConnectionState = newCdmaDataConnectionState;
networkType = newNetworkType;
+ // this new state has been applied - forget it until we get a new new state
+ newNetworkType = 0;
newSS.setStateOutOfService(); // clean slate for next time
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index c107d174919f..bb99e4564c1d 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -957,6 +957,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
gprsState = newGPRSState;
networkType = newNetworkType;
+ // this new state has been applied - forget it until we get a new new state
+ newNetworkType = 0;
+
newSS.setStateOutOfService(); // clean slate for next time