Merge change I7fb3bc59 into eclair
* changes:
Add new date formats for the lock screen.
diff --git a/core/java/android/content/AbstractSyncableContentProvider.java b/core/java/android/content/AbstractSyncableContentProvider.java
index fbe3548..3716274 100644
--- a/core/java/android/content/AbstractSyncableContentProvider.java
+++ b/core/java/android/content/AbstractSyncableContentProvider.java
@@ -135,8 +135,10 @@
public void onCreate(SQLiteDatabase db) {
bootstrapDatabase(db);
mSyncState.createDatabase(db);
- ContentResolver.requestSync(null /* all accounts */,
+ if (!isTemporary()) {
+ ContentResolver.requestSync(null /* all accounts */,
mContentUri.getAuthority(), new Bundle());
+ }
}
@Override
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 142774f..a8d9f1d 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -4297,7 +4297,7 @@
private int computeMaxScrollY() {
int maxContentH = computeVerticalScrollRange() + getTitleHeight();
- return Math.max(maxContentH - getHeight(), getTitleHeight());
+ return Math.max(maxContentH - getViewHeightWithTitle(), getTitleHeight());
}
public void flingScroll(int vx, int vy) {
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 5aef56d..23888ff 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -28,7 +28,6 @@
#include <GLES/glext.h>
#include <time.h>
-#include <cutils/tztime.h>
using namespace android;
using namespace android::renderscript;
@@ -444,15 +443,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_sec;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_sec;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_sec;
}
static int32_t SC_minute()
@@ -462,15 +455,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_min;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_min;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_min;
}
static int32_t SC_hour()
@@ -480,15 +467,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_hour;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_hour;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_hour;
}
static int32_t SC_day()
@@ -498,15 +479,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_mday;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_mday;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_mday;
}
static int32_t SC_month()
@@ -516,15 +491,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_mon;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_mon;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_mon;
}
static int32_t SC_year()
@@ -534,15 +503,9 @@
time_t rawtime;
time(&rawtime);
- if (sc->mEnviroment.mTimeZone) {
- struct tm timeinfo;
- localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone);
- return timeinfo.tm_year;
- } else {
- struct tm *timeinfo;
- timeinfo = localtime(&rawtime);
- return timeinfo->tm_year;
- }
+ struct tm *timeinfo;
+ timeinfo = localtime(&rawtime);
+ return timeinfo->tm_year;
}
static int32_t SC_uptimeMillis()
diff --git a/services/java/com/android/server/DockObserver.java b/services/java/com/android/server/DockObserver.java
index f089de1..c2b1b96 100644
--- a/services/java/com/android/server/DockObserver.java
+++ b/services/java/com/android/server/DockObserver.java
@@ -111,8 +111,17 @@
try {
int newState = Integer.parseInt(event.get("SWITCH_STATE"));
if (newState != mDockState) {
+ int oldState = mDockState;
mDockState = newState;
if (mSystemReady) {
+ // Don't force screen on when undocking from the desk dock.
+ // The change in power state will do this anyway.
+ // FIXME - we should be configurable.
+ if (oldState != Intent.EXTRA_DOCK_STATE_DESK ||
+ newState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
+ mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(),
+ false, true);
+ }
update();
}
}
@@ -166,7 +175,6 @@
return;
}
// Pack up the values and broadcast them to everyone
- mPowerManager.userActivityWithForce(SystemClock.uptimeMillis(), false, true);
Intent intent = new Intent(Intent.ACTION_DOCK_EVENT);
intent.putExtra(Intent.EXTRA_DOCK_STATE, mDockState);