Fix issue #3306021 NPE at android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java)
It looks like the dialog fragment was not being removed along with the containing fragment. The containing fragment now checks for when it is being removed and removes its dialog fragment at that point. Also fix issue #3340766 NPE at com.android.settings.applications.RunningProcessesView.startServiceDetailsActivity We need to check if the running processes view is still attached to its owner, since we clear owner when it is paused. In addition, fix a bug where ManageApplications was not persisting its "show background processes" state, and remove the icons from its menu items to make them more understandable in the action bar. Change-Id: I4498ef92023eb60f90758ff18d8eed7b41af79b0
This commit is contained in:
@@ -431,15 +431,17 @@ public class RunningProcessesView extends FrameLayout
|
||||
|
||||
// utility method used to start sub activity
|
||||
private void startServiceDetailsActivity(RunningState.MergedItem mi) {
|
||||
// start new fragment to display extended information
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(RunningServiceDetails.KEY_UID, mi.mProcess.mUid);
|
||||
args.putString(RunningServiceDetails.KEY_PROCESS, mi.mProcess.mProcessName);
|
||||
args.putBoolean(RunningServiceDetails.KEY_BACKGROUND, mAdapter.mShowBackground);
|
||||
|
||||
PreferenceActivity pa = (PreferenceActivity)mOwner.getActivity();
|
||||
pa.startPreferencePanel(RunningServiceDetails.class.getName(), args,
|
||||
R.string.runningservicedetails_settings_title, null, null, 0);
|
||||
if (mOwner != null) {
|
||||
// start new fragment to display extended information
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(RunningServiceDetails.KEY_UID, mi.mProcess.mUid);
|
||||
args.putString(RunningServiceDetails.KEY_PROCESS, mi.mProcess.mProcessName);
|
||||
args.putBoolean(RunningServiceDetails.KEY_BACKGROUND, mAdapter.mShowBackground);
|
||||
|
||||
PreferenceActivity pa = (PreferenceActivity)mOwner.getActivity();
|
||||
pa.startPreferencePanel(RunningServiceDetails.class.getName(), args,
|
||||
R.string.runningservicedetails_settings_title, null, null, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void onMovedToScrapHeap(View view) {
|
||||
|
Reference in New Issue
Block a user