Fix an NPE.

Sometimes name is null, compare the other way around.
This commit is contained in:
Amith Yamasani
2009-06-25 12:27:21 -07:00
parent 0f1e11e219
commit 1fd2958ad4

View File

@@ -575,7 +575,7 @@ public class PowerUsageSummary extends PreferenceActivity implements Runnable {
//name = Integer.toString(uid); //name = Integer.toString(uid);
if (uid == 0) { if (uid == 0) {
name = getResources().getString(R.string.process_kernel_label); name = getResources().getString(R.string.process_kernel_label);
} else if (name.equals("mediaserver")) { } else if ("mediaserver".equals(name)) {
name = getResources().getString(R.string.process_mediaserver_label); name = getResources().getString(R.string.process_mediaserver_label);
} }
return; return;