diff options
author | Michael Chan <mchan@android.com> | 2009-05-14 17:47:02 -0700 |
---|---|---|
committer | Michael Chan <mchan@android.com> | 2009-05-14 17:47:02 -0700 |
commit | 8762093e0094e09493fa6cbac8e8fbf265f18165 (patch) | |
tree | 3711951fb324975a29045c9fbdb9b2abdef1995d /src/com/android/settings/ManageApplications.java | |
parent | 4815a667cd8ce64b623523a5e1a42d900b2a0a05 (diff) | |
download | packages_apps_Settings-8762093e0094e09493fa6cbac8e8fbf265f18165.tar.gz packages_apps_Settings-8762093e0094e09493fa6cbac8e8fbf265f18165.tar.bz2 packages_apps_Settings-8762093e0094e09493fa6cbac8e8fbf265f18165.zip |
Findbug fixes in Settings app
modified: src/com/android/settings/ApnPreference.java
modified: src/com/android/settings/ApnSettings.java
modified: src/com/android/settings/BandMode.java
modified: src/com/android/settings/BatteryInfo.java
modified: src/com/android/settings/LanguageSettings.java
modified: src/com/android/settings/ManageApplications.java
modified: src/com/android/settings/RadioInfo.java
modified: src/com/android/settings/SdCardSettings.java
modified: src/com/android/settings/UsageStats.java
modified: src/com/android/settings/ZoneList.java
modified: src/com/android/settings/bluetooth/LocalBluetoothDevice.java
modified: src/com/android/settings/deviceinfo/Status.java
modified: src/com/android/settings/quicklaunch/QuickLaunchSettings.java
modified: src/com/android/settings/wifi/AccessPointDialog.java
modified: src/com/android/settings/wifi/AccessPointPreference.java
modified: src/com/android/settings/wifi/WifiLayer.java
modified: src/com/android/settings/wifi/WifiSettings.java
Diffstat (limited to 'src/com/android/settings/ManageApplications.java')
-rw-r--r-- | src/com/android/settings/ManageApplications.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/com/android/settings/ManageApplications.java b/src/com/android/settings/ManageApplications.java index 1595de148..e5b2134c0 100644 --- a/src/com/android/settings/ManageApplications.java +++ b/src/com/android/settings/ManageApplications.java @@ -426,15 +426,20 @@ public class ManageApplications extends ListActivity implements public void onGetStatsCompleted(PackageStats pStats, boolean pSucceeded) { AppInfo appInfo = null; Bundle data = new Bundle(); - data.putString(ATTR_PKG_NAME, pStats.packageName); - if(pSucceeded && pStats != null) { - if (localLOGV) Log.i(TAG, "onGetStatsCompleted::"+pStats.packageName+", ("+ - pStats.cacheSize+","+ - pStats.codeSize+", "+pStats.dataSize); - data.putParcelable(ATTR_APP_PKG_STATS, pStats); - } else { + if (pStats != null) { + data.putString(ATTR_PKG_NAME, pStats.packageName); + if(pSucceeded) { + if (localLOGV) Log.i(TAG, "onGetStatsCompleted::"+pStats.packageName+", ("+ + pStats.cacheSize+","+ + pStats.codeSize+", "+pStats.dataSize); + data.putParcelable(ATTR_APP_PKG_STATS, pStats); + } + } + + if(!pSucceeded || pStats == null) { Log.w(TAG, "Invalid package stats from PackageManager"); } + //post message to Handler Message msg = mHandler.obtainMessage(mMsgId, data); msg.setData(data); @@ -705,7 +710,7 @@ public class ManageApplications extends ListActivity implements // internal structure used to track added and deleted packages when // the activity has focus - class AddRemoveInfo { + static class AddRemoveInfo { String pkgName; boolean add; public AddRemoveInfo(String pPkgName, boolean pAdd) { |