From 44898ad0aa2a12788fc9cfc6b78fa7adc9d90f23 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Thu, 13 Aug 2015 12:03:47 -0700 Subject: Convert Dialer activities to AppCompat to support Snackbar. In order to add an "Undo" snackbar for voicemail, dialer activities need to inherit from the AppCompat library. Add the relevant libraries to the make files and change the styles to be compatible. Bug: 22460745 Change-Id: Ia3cc4002cbd943da818fec67f888d085d53a3b25 --- src/com/android/dialer/CallDetailActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/CallDetailActivity.java') diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 56f2cb1dc..32eccc45d 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -27,6 +27,8 @@ import android.os.Bundle; import android.os.PowerManager; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.VoicemailContract.Voicemails; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; @@ -72,7 +74,7 @@ import java.util.List; * This activity can be either started with the URI of a single call log entry, or with the * {@link #EXTRA_CALL_LOG_IDS} extra to specify a group of call log entries. */ -public class CallDetailActivity extends Activity +public class CallDetailActivity extends AppCompatActivity implements MenuItem.OnMenuItemClickListener { private static final String TAG = "CallDetail"; @@ -259,7 +261,7 @@ public class CallDetailActivity extends Activity }); mContactInfoHelper = new ContactInfoHelper(this, GeoUtil.getCurrentCountryIso(this)); - getActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); if (getIntent().getBooleanExtra(EXTRA_FROM_NOTIFICATION, false)) { closeSystemDialogs(); -- cgit v1.2.3