summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-05-13 14:06:25 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-05-13 14:06:25 -0700
commit5a9cbb291fa7505a6c51eba6f600009dfc17366d (patch)
tree366967965e321597c96e9ffc9e81a6c3bab96016 /core
parent54a8f2952341e39685c920e9be43e57d33e4b01b (diff)
parenta3d5549c802bc4fbf1e1ca05bc3552db17212036 (diff)
downloadframeworks_base-5a9cbb291fa7505a6c51eba6f600009dfc17366d.zip
frameworks_base-5a9cbb291fa7505a6c51eba6f600009dfc17366d.tar.gz
frameworks_base-5a9cbb291fa7505a6c51eba6f600009dfc17366d.tar.bz2
am a3d5549c: am 098e58da: Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
Merge commit 'a3d5549c802bc4fbf1e1ca05bc3552db17212036' into kraken * commit 'a3d5549c802bc4fbf1e1ca05bc3552db17212036': Use SystemClock.elapsedRealtime in ShutdownThread timeout logic
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/app/ShutdownThread.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/com/android/internal/app/ShutdownThread.java b/core/java/com/android/internal/app/ShutdownThread.java
index 83614a8..a96253b 100644
--- a/core/java/com/android/internal/app/ShutdownThread.java
+++ b/core/java/com/android/internal/app/ShutdownThread.java
@@ -199,10 +199,10 @@ public final class ShutdownThread extends Thread {
mContext.sendOrderedBroadcast(new Intent(Intent.ACTION_SHUTDOWN), null,
br, mHandler, 0, null, null);
- final long endTime = System.currentTimeMillis() + MAX_BROADCAST_TIME;
+ final long endTime = SystemClock.elapsedRealtime() + MAX_BROADCAST_TIME;
synchronized (mActionDoneSync) {
while (!mActionDone) {
- long delay = endTime - System.currentTimeMillis();
+ long delay = endTime - SystemClock.elapsedRealtime();
if (delay <= 0) {
Log.w(TAG, "Shutdown broadcast timed out");
break;
@@ -297,7 +297,7 @@ public final class ShutdownThread extends Thread {
Log.i(TAG, "Shutting down MountService");
// Set initial variables and time out time.
mActionDone = false;
- final long endShutTime = System.currentTimeMillis() + MAX_SHUTDOWN_WAIT_TIME;
+ final long endShutTime = SystemClock.elapsedRealtime() + MAX_SHUTDOWN_WAIT_TIME;
synchronized (mActionDoneSync) {
try {
if (mount != null) {
@@ -309,7 +309,7 @@ public final class ShutdownThread extends Thread {
Log.e(TAG, "Exception during MountService shutdown", e);
}
while (!mActionDone) {
- long delay = endShutTime - System.currentTimeMillis();
+ long delay = endShutTime - SystemClock.elapsedRealtime();
if (delay <= 0) {
Log.w(TAG, "Shutdown wait timed out");
break;