summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications/RunningProcessesView.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-08-15 17:28:36 -0700
committerDianne Hackborn <hackbod@google.com>2010-08-15 17:29:07 -0700
commitff3673c7f477b1d78e64a8bc28754552dcdc8826 (patch)
tree89465df36b08fb800f7097902ab68efecad203f1 /src/com/android/settings/applications/RunningProcessesView.java
parentbe5994d20152c7194aac79eb8152240655fd3373 (diff)
downloadpackages_apps_settings-ff3673c7f477b1d78e64a8bc28754552dcdc8826.zip
packages_apps_settings-ff3673c7f477b1d78e64a8bc28754552dcdc8826.tar.gz
packages_apps_settings-ff3673c7f477b1d78e64a8bc28754552dcdc8826.tar.bz2
Make running services initial update async.
Also fix the value show for an app's awake time. Change-Id: I801681d3a1d47a6bb1f3fb8cc5b0ef009201146f
Diffstat (limited to 'src/com/android/settings/applications/RunningProcessesView.java')
-rw-r--r--src/com/android/settings/applications/RunningProcessesView.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/settings/applications/RunningProcessesView.java b/src/com/android/settings/applications/RunningProcessesView.java
index f2d8e9e..1de67f7 100644
--- a/src/com/android/settings/applications/RunningProcessesView.java
+++ b/src/com/android/settings/applications/RunningProcessesView.java
@@ -64,6 +64,8 @@ public class RunningProcessesView extends FrameLayout
RunningState mState;
+ Runnable mDataAvail;
+
StringBuilder mBuilder = new StringBuilder(128);
RunningState.BaseItem mCurSelected;
@@ -390,6 +392,11 @@ public class RunningProcessesView extends FrameLayout
adapter.notifyDataSetChanged();
}
+ if (mDataAvail != null) {
+ mDataAvail.run();
+ mDataAvail = null;
+ }
+
// This is the amount of available memory until we start killing
// background services.
long availMem = readAvailMem() - SECONDARY_SERVER_MEM;
@@ -475,15 +482,19 @@ public class RunningProcessesView extends FrameLayout
public void doPause() {
mState.pause();
+ mDataAvail = null;
}
- public void doResume() {
+ public boolean doResume(Runnable dataAvail) {
mState.resume(this);
if (mState.hasData()) {
// If the state already has its data, then let's populate our
// list right now to avoid flicker.
refreshUi(true);
+ return true;
}
+ mDataAvail = dataAvail;
+ return false;
}
public Object doRetainNonConfigurationInstance() {