diff options
author | Yorke Lee <yorkelee@google.com> | 2014-04-18 10:48:29 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-04-18 11:45:58 -0700 |
commit | 4acac9b820d00d4f666519de2dbee0f82e537a9e (patch) | |
tree | ce101f0a6f2e17afc6627634f10fed45a2a8214c /src | |
parent | b70f8a8f6e0016bbb1876a5127f635acd4568a05 (diff) |
Remove AllContactsActivity
Bug: 14157588
Change-Id: I48342e9a5f78173f84967e3330add8fd87442bea
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 11 | ||||
-rw-r--r-- | src/com/android/dialer/list/AllContactsActivity.java | 86 | ||||
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteFragment.java | 35 |
3 files changed, 0 insertions, 132 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 9890b4a3c..db4ff35eb 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -70,7 +70,6 @@ import com.android.dialer.dialpad.DialpadFragment; import com.android.dialer.dialpad.SmartDialNameMatcher; import com.android.dialer.dialpad.SmartDialPrefix; import com.android.dialer.interactions.PhoneNumberInteraction; -import com.android.dialer.list.AllContactsActivity; import com.android.dialer.list.DragDropController; import com.android.dialer.list.ListsFragment; import com.android.dialer.list.OnDragDropListener; @@ -94,7 +93,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O DialpadFragment.OnDialpadQueryChangedListener, OnListFragmentScrolledListener, DialpadFragment.HostInterface, - PhoneFavoriteFragment.OnShowAllContactsListener, PhoneFavoriteFragment.HostInterface, OnDragDropListener, View.OnLongClickListener, OnPhoneNumberPickerActionListener { @@ -495,9 +493,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O case R.id.menu_call_settings: handleMenuSettings(); return true; - case R.id.menu_all_contacts: - onShowAllContacts(); - return true; } return false; } @@ -902,12 +897,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return tm.getCallState() != TelephonyManager.CALL_STATE_IDLE; } - @Override - public void onShowAllContacts() { - final Intent intent = new Intent(this, AllContactsActivity.class); - startActivity(intent); - } - public static Intent getAddNumberToContactIntent(CharSequence text) { final Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT); intent.putExtra(Intents.Insert.PHONE, text); diff --git a/src/com/android/dialer/list/AllContactsActivity.java b/src/com/android/dialer/list/AllContactsActivity.java deleted file mode 100644 index b518ee936..000000000 --- a/src/com/android/dialer/list/AllContactsActivity.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.dialer.list; - -import android.app.ActionBar; -import android.app.Fragment; -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.text.Spannable; -import android.text.SpannableString; -import android.text.style.TypefaceSpan; -import android.util.Log; - -import com.android.contacts.common.CallUtil; -import com.android.contacts.common.activity.TransactionSafeActivity; -import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; -import com.android.dialer.DialtactsActivity; -import com.android.dialer.R; -import com.android.dialer.interactions.PhoneNumberInteraction; - -public class AllContactsActivity extends TransactionSafeActivity { - private static final String TAG = AllContactsActivity.class.getSimpleName(); - - private AllContactsFragment mAllContactsFragment; - - // Same behavior as {@link DialtactsActivity} - private final OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener = - new OnPhoneNumberPickerActionListener() { - @Override - public void onPickPhoneNumberAction(Uri dataUri) { - // Specify call-origin so that users will see the previous tab instead of - // CallLog screen (search UI will be automatically exited). - PhoneNumberInteraction.startInteractionForPhoneCall( - AllContactsActivity.this, dataUri, null); - } - - @Override - public void onCallNumberDirectly(String phoneNumber) { - final Intent intent = CallUtil.getCallIntent(phoneNumber, null); - startActivity(intent); - } - - @Override - public void onShortcutIntentCreated(Intent intent) { - Log.w(TAG, "Unsupported intent has come (" + intent + "). Ignoring."); - } - - @Override - public void onHomeInActionBarSelected() { - // {@link PhoneNumberPickerFragment handles onClick on the home button - // and performs the callback here. This means we don't have to handle it - // ourself in the activity. - final Intent intent = new Intent(AllContactsActivity.this, - DialtactsActivity.class); - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - startActivity(intent); - } - }; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - final ActionBar actionBar = getActionBar(); - actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); - actionBar.setDisplayShowHomeEnabled(true); - actionBar.setDisplayHomeAsUpEnabled(true); - actionBar.setDisplayShowTitleEnabled(true); - - setContentView(R.layout.all_contacts_activity); - } -} diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index c0dbd8ca5..f3787e5b8 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -99,10 +99,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen private static final String KEY_LAST_DISMISSED_CALL_SHORTCUT_DATE = "key_last_dismissed_call_shortcut_date"; - public interface OnShowAllContactsListener { - public void onShowAllContacts(); - } - public interface HostInterface { public void setDragDropController(DragDropController controller); } @@ -188,7 +184,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen private OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener; private OnListFragmentScrolledListener mActivityScrollListener; - private OnShowAllContactsListener mShowAllContactsListener; private PhoneFavoriteMergedAdapter mAdapter; private PhoneFavoritesTileAdapter mContactTileAdapter; @@ -290,7 +285,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen mEmptyView = mParentView.findViewById(R.id.phone_no_favorites_view); mPhoneFavoritesMenu = inflater.inflate(R.layout.phone_favorites_menu, mListView, false); - prepareFavoritesMenu(mPhoneFavoritesMenu); mContactTileFrame = mParentView.findViewById(R.id.contact_tile_frame); @@ -343,13 +337,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen } try { - mShowAllContactsListener = (OnShowAllContactsListener) activity; - } catch (ClassCastException e) { - throw new ClassCastException(activity.toString() - + " must implement OnShowAllContactsListener"); - } - - try { OnDragDropListener listener = (OnDragDropListener) activity; mListView.getDragDropController().addOnDragDropListener(listener); ((HostInterface) activity).setDragDropController(mListView.getDragDropController()); @@ -387,13 +374,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen } } - /** - * Gets called when user click on the show all contacts button. - */ - private void showAllContacts() { - mShowAllContactsListener.onShowAllContacts(); - } - @Override public void onVoicemailStatusFetched(Cursor statusCursor) { // no-op @@ -662,19 +642,4 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen .apply(); fetchCalls(); } - - /** - * Prepares the favorites menu which contains the static label "Speed Dial" and the - * "All Contacts" button. Sets the onClickListener for the "All Contacts" button. - */ - private void prepareFavoritesMenu(View favoritesMenu) { - Button allContactsButton = (Button) favoritesMenu.findViewById(R.id.all_contacts_button); - // Set the onClick listener for the button to bring up the all contacts view. - allContactsButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - showAllContacts(); - } - }); - } } |