diff --git a/src/com/android/contacts/common/list/AccountFilterActivity.java b/src/com/android/contacts/common/list/AccountFilterActivity.java
index a06a242..20be63b 100644
--- a/src/com/android/contacts/common/list/AccountFilterActivity.java
+++ b/src/com/android/contacts/common/list/AccountFilterActivity.java
@@ -16,8 +16,6 @@
 
 package com.android.contacts.common.list;
 
-import android.app.ActionBar;
-import android.app.Activity;
 import android.app.LoaderManager.LoaderCallbacks;
 import android.content.AsyncTaskLoader;
 import android.content.Context;
@@ -25,6 +23,8 @@
 import android.content.Loader;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
@@ -47,7 +47,8 @@
  * Shows a list of all available accounts, letting the user select under which account to view
  * contacts.
  */
-public class AccountFilterActivity extends Activity implements AdapterView.OnItemClickListener {
+public class AccountFilterActivity extends AppCompatActivity
+        implements AdapterView.OnItemClickListener {
 
     private static final String TAG = AccountFilterActivity.class.getSimpleName();
 
@@ -70,7 +71,7 @@
         mListView = (ListView) findViewById(android.R.id.list);
         mListView.setOnItemClickListener(this);
 
-        ActionBar actionBar = getActionBar();
+        ActionBar actionBar = getSupportActionBar();
         if (actionBar != null) {
             actionBar.setDisplayHomeAsUpEnabled(true);
         }
@@ -182,14 +183,14 @@
             listFilterView.announceForAccessibility(listFilterView.generateContentDescription());
             final Intent intent = new Intent();
             intent.putExtra(KEY_EXTRA_CONTACT_LIST_FILTER, filter);
-            setResult(Activity.RESULT_OK, intent);
+            setResult(AppCompatActivity.RESULT_OK, intent);
             finish();
         }
     }
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (resultCode != Activity.RESULT_OK) {
+        if (resultCode != AppCompatActivity.RESULT_OK) {
             return;
         }
 
@@ -199,7 +200,7 @@
                 ContactListFilter filter = ContactListFilter.createFilterWithType(
                         ContactListFilter.FILTER_TYPE_CUSTOM);
                 intent.putExtra(KEY_EXTRA_CONTACT_LIST_FILTER, filter);
-                setResult(Activity.RESULT_OK, intent);
+                setResult(AppCompatActivity.RESULT_OK, intent);
                 finish();
                 break;
             }
diff --git a/src/com/android/contacts/common/list/CustomContactListFilterActivity.java b/src/com/android/contacts/common/list/CustomContactListFilterActivity.java
index b3253cc..e11e94d 100644
--- a/src/com/android/contacts/common/list/CustomContactListFilterActivity.java
+++ b/src/com/android/contacts/common/list/CustomContactListFilterActivity.java
@@ -16,8 +16,6 @@
 
 package com.android.contacts.common.list;
 
-import android.app.ActionBar;
-import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.LoaderManager.LoaderCallbacks;
 import android.app.ProgressDialog;
@@ -39,6 +37,8 @@
 import android.provider.ContactsContract;
 import android.provider.ContactsContract.Groups;
 import android.provider.ContactsContract.Settings;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.LayoutInflater;
@@ -73,7 +73,7 @@
  * Shows a list of all available {@link Groups} available, letting the user
  * select which ones they want to be visible.
  */
-public class CustomContactListFilterActivity extends Activity
+public class CustomContactListFilterActivity extends AppCompatActivity
         implements View.OnClickListener, ExpandableListView.OnChildClickListener,
         LoaderCallbacks<CustomContactListFilterActivity.AccountSet>
 {
@@ -106,7 +106,7 @@
 
         mList.setAdapter(mAdapter);
 
-        ActionBar actionBar = getActionBar();
+        ActionBar actionBar = getSupportActionBar();
         if (actionBar != null) {
             // android.R.id.home will be triggered in onOptionsItemSelected()
             actionBar.setDisplayHomeAsUpEnabled(true);
@@ -852,16 +852,16 @@
      * showing spinner dialog to user while updating.
      */
     public static class UpdateTask extends
-            WeakAsyncTask<ArrayList<ContentProviderOperation>, Void, Void, Activity> {
+            WeakAsyncTask<ArrayList<ContentProviderOperation>, Void, Void, AppCompatActivity> {
         private ProgressDialog mProgress;
 
-        public UpdateTask(Activity target) {
+        public UpdateTask(AppCompatActivity target) {
             super(target);
         }
 
         /** {@inheritDoc} */
         @Override
-        protected void onPreExecute(Activity target) {
+        protected void onPreExecute(AppCompatActivity target) {
             final Context context = target;
 
             mProgress = ProgressDialog.show(
@@ -875,7 +875,7 @@
         /** {@inheritDoc} */
         @Override
         protected Void doInBackground(
-                Activity target, ArrayList<ContentProviderOperation>... params) {
+                AppCompatActivity target, ArrayList<ContentProviderOperation>... params) {
             final Context context = target;
             final ContentValues values = new ContentValues();
             final ContentResolver resolver = context.getContentResolver();
@@ -894,7 +894,7 @@
 
         /** {@inheritDoc} */
         @Override
-        protected void onPostExecute(Activity target, Void result) {
+        protected void onPostExecute(AppCompatActivity target, Void result) {
             final Context context = target;
 
             try {
@@ -915,7 +915,7 @@
         switch (item.getItemId()) {
             case android.R.id.home:
                 // Pretend cancel.
-                setResult(Activity.RESULT_CANCELED);
+                setResult(AppCompatActivity.RESULT_CANCELED);
                 finish();
                 return true;
             default:
