Merge "Avoid NullPointerException when AppPicker onCreated called." into main
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.development;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -57,7 +58,11 @@ public class AppPicker extends ListActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
mPermissionName = getIntent().getStringExtra(EXTRA_REQUESTIING_PERMISSION);
|
||||
mDebuggableOnly = getIntent().getBooleanExtra(EXTRA_DEBUGGABLE, false);
|
||||
|
Reference in New Issue
Block a user