Remove long animation setting (standard length is now longer).

Also a few tweaks to the running services UI.

Change-Id: I160dc5fd52a865ca95288aad787e28b814080c53
This commit is contained in:
Dianne Hackborn
2009-09-21 00:37:32 -07:00
parent 7d1e086504
commit 8c212ef4cf
3 changed files with 24 additions and 19 deletions

View File

@@ -53,7 +53,6 @@
<item>No animations</item>
<item>Some animations</item>
<item>All animations</item>
<item>Slower all animations</item>
</string-array>
<!-- Display settings. Summary for each type of animation. -->
@@ -61,7 +60,6 @@
<item>No window animations are shown</item>
<item>Some window animations are shown</item>
<item>All window animations are shown</item>
<item>Slower window animations are shown</item>
</string-array>
<!-- Do not translate. -->
@@ -72,8 +70,6 @@
<item>01</item>
<!-- Do not translate. -->
<item>11</item>
<!-- Do not translate. -->
<item>22</item>
</string-array>
<!-- Display settings. The delay in inactivity before the screen is turned off. These are shown ain a list dialog. -->

View File

@@ -1422,8 +1422,9 @@ found in the list of installed applications.</string>
<string name="confirm_stop_service">Stop service?</string>
<!-- Running services, message of dialog to stop a service -->
<string name="confirm_stop_service_msg">The service will no longer run until
started again by its application. This may have undesireable
consequences.</string>
started again. This may have undesireable
consequences on the applicaton
<xliff:g id="application">%1$s</xliff:g>.</string>
<!-- Running services, button to stop a service -->
<string name="confirm_stop_stop">Stop</string>
<!-- Running services, button to cancel stopping of a service -->
@@ -1433,9 +1434,11 @@ found in the list of installed applications.</string>
<!-- Running services, description for a service in the started state -->
<string name="service_client_name"><xliff:g id="client_name">%1$s</xliff:g>: select to manage</string>
<!-- Running services, summary of background processes -->
<string name="service_background_processes">Bg: <xliff:g id="memory">%2$s</xliff:g> (<xliff:g id="count">%1$d</xliff:g> procs)</string>
<string name="service_background_processes">Avail: <xliff:g id="memory">%2$s</xliff:g> (<xliff:g id="count">%1$d</xliff:g> procs)</string>
<!-- Running services, summary of foreground processes -->
<string name="service_foreground_processes">Fg: <xliff:g id="memory">%2$s</xliff:g> (<xliff:g id="count">%1$d</xliff:g> procs)</string>
<string name="service_foreground_processes">Other: <xliff:g id="memory">%2$s</xliff:g> (<xliff:g id="count">%1$d</xliff:g> procs)</string>
<!-- Text to label a process entry with the process name. -->
<string name="service_process_name">Process: <xliff:g id="process">%1$s</xliff:g></string>
<!-- Language Settings --> <skip />
<!-- Title of setting on main settings screen. This item will take the user to the screen to tweak settings realted to locale and text -->

View File

@@ -169,9 +169,10 @@ public class RunningServices extends ListActivity
int mRunningSeq;
ActivityManager.RunningAppProcessInfo mRunningProcessInfo;
public ProcessItem(int uid, String processName) {
public ProcessItem(Context context, int uid, String processName) {
super(true);
mDescription = processName;
mDescription = context.getResources().getString(
R.string.service_process_name, processName);
mUid = uid;
mProcessName = processName;
}
@@ -274,7 +275,7 @@ public class RunningServices extends ListActivity
}
si.mDisplayLabel = si.mLabel;
}
si.mPackageInfo = si.mServiceInfo;
si.mPackageInfo = si.mServiceInfo.applicationInfo;
mServices.put(service.service, si);
}
si.mCurSeq = mCurSeq;
@@ -312,7 +313,7 @@ public class RunningServices extends ListActivity
boolean updateSize(Context context, Debug.MemoryInfo mem, int curSeq) {
mSize = ((long)mem.getTotalPss()) * 1024;
if (mCurSeq == curSeq) {
String sizeStr = Formatter.formatFileSize(
String sizeStr = Formatter.formatShortFileSize(
context, mSize);
if (!sizeStr.equals(mSizeStr)){
mSizeStr = sizeStr;
@@ -415,7 +416,7 @@ public class RunningServices extends ListActivity
ProcessItem proc = procs.get(si.process);
if (proc == null) {
changed = true;
proc = new ProcessItem(si.uid, si.process);
proc = new ProcessItem(context, si.uid, si.process);
procs.put(si.process, proc);
}
@@ -453,7 +454,7 @@ public class RunningServices extends ListActivity
// running list.
proc = mRunningProcesses.get(pi.pid);
if (proc == null) {
proc = new ProcessItem(pi.uid, pi.processName);
proc = new ProcessItem(context, pi.uid, pi.processName);
proc.mPid = pi.pid;
mRunningProcesses.put(pi.pid, proc);
}
@@ -698,12 +699,14 @@ public class RunningServices extends ListActivity
vh.description.setText(item.mDescription);
if (item.mIsProcess) {
view.setBackgroundColor(mProcessBgColor);
vh.icon.setImageDrawable(item.mPackageInfo.loadIcon(getPackageManager()));
vh.icon.setImageDrawable(null);
vh.icon.setVisibility(View.GONE);
vh.description.setText(item.mDescription);
item.mCurSizeStr = null;
} else {
view.setBackgroundDrawable(null);
vh.icon.setImageDrawable(null);
vh.icon.setImageDrawable(item.mPackageInfo.loadIcon(getPackageManager()));
vh.icon.setVisibility(View.VISIBLE);
vh.description.setText(item.mDescription);
ai.mFirstRunTime = item.mActiveSince;
}
@@ -765,7 +768,7 @@ public class RunningServices extends ListActivity
|| mLastBackgroundProcessMemory != mState.mBackgroundProcessMemory) {
mLastNumBackgroundProcesses = mState.mNumBackgroundProcesses;
mLastBackgroundProcessMemory = mState.mBackgroundProcessMemory;
String sizeStr = Formatter.formatFileSize(this, mLastBackgroundProcessMemory);
String sizeStr = Formatter.formatShortFileSize(this, mLastBackgroundProcessMemory);
mBackgroundProcessText.setText(getResources().getString(
R.string.service_background_processes, mLastNumBackgroundProcesses, sizeStr));
}
@@ -773,7 +776,7 @@ public class RunningServices extends ListActivity
|| mLastForegroundProcessMemory != mState.mForegroundProcessMemory) {
mLastNumForegroundProcesses = mState.mNumForegroundProcesses;
mLastForegroundProcessMemory = mState.mForegroundProcessMemory;
String sizeStr = Formatter.formatFileSize(this, mLastForegroundProcessMemory);
String sizeStr = Formatter.formatShortFileSize(this, mLastForegroundProcessMemory);
mForegroundProcessText.setText(getResources().getString(
R.string.service_foreground_processes, mLastNumForegroundProcesses, sizeStr));
}
@@ -806,7 +809,10 @@ public class RunningServices extends ListActivity
mCurSelected = bi;
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.confirm_stop_service);
builder.setMessage(R.string.confirm_stop_service_msg);
String msg = getResources().getString(
R.string.confirm_stop_service_msg,
si.mPackageInfo.loadLabel(getPackageManager()));
builder.setMessage(msg);
builder.setPositiveButton(R.string.confirm_stop_stop, this);
builder.setNegativeButton(R.string.confirm_stop_cancel, null);
builder.setCancelable(true);