Merge "Add a null check on ActionBar since there isn't one present on Android Wear devices." into pi-dev
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsActivity.java b/src/com/android/phone/settings/PhoneAccountSettingsActivity.java
index 71ae8cf..56f5594 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsActivity.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsActivity.java
@@ -16,6 +16,7 @@
 
 package com.android.phone.settings;
 
+import android.app.ActionBar;
 import android.os.Bundle;
 import android.preference.PreferenceActivity;
 import android.view.MenuItem;
@@ -27,8 +28,10 @@
     @Override
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-
-        getActionBar().setTitle(R.string.phone_accounts);
+        final ActionBar actionBar = getActionBar();
+        if (actionBar != null) {
+            actionBar.setTitle(R.string.phone_accounts);
+        }
         getFragmentManager().beginTransaction().replace(
                 android.R.id.content, new PhoneAccountSettingsFragment()).commit();
     }