summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-18 22:35:17 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-18 22:35:17 +0000
commit150621605d4d9993e6a9ffae34af171ec4ee06ba (patch)
treedbd3b802ecbeffc2af9eb3972e94278028d58b21 /src
parentbfeebdf6c86da147f376695b913d16d34eda64c2 (diff)
parent1e6efea12e3d9c72d31c8be2fd1ea8be2dfdb227 (diff)
am 1e6efea1: Merge "Remove AllContactsActivity"
* commit '1e6efea12e3d9c72d31c8be2fd1ea8be2dfdb227': Remove AllContactsActivity
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java11
-rw-r--r--src/com/android/dialer/list/AllContactsActivity.java86
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteFragment.java35
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 a53117c47..301b8ddc1 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -100,10 +100,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);
}
@@ -189,7 +185,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen
private OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener;
private OnListFragmentScrolledListener mActivityScrollListener;
- private OnShowAllContactsListener mShowAllContactsListener;
private PhoneFavoriteMergedAdapter mAdapter;
private PhoneFavoritesTileAdapter mContactTileAdapter;
@@ -295,7 +290,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);
@@ -349,13 +343,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());
@@ -393,13 +380,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
@@ -668,19 +648,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();
- }
- });
- }
}