summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-23 15:10:58 -0700
committerYorke Lee <yorkelee@google.com>2014-04-23 15:11:33 -0700
commitd999b71452baebec789f6f58f1955d30e834826d (patch)
tree14bb0cae7d93163e0154137ed78589ee30f3cc8f /src
parenteb1df8edf78899a6666bc460a3e170fa0b9d6d14 (diff)
Rename classes
Renamed PhoneFavoriteFragment to SpeedDialFragment Renamed PhoneFavoriteMergedAdapter to ShortcutCardsAdapter Change-Id: I5b16ff576332b44c10e1abb44689147cd41c26b5
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java10
-rw-r--r--src/com/android/dialer/list/ListsFragment.java8
-rw-r--r--src/com/android/dialer/list/ShortcutCardsAdapter.java (renamed from src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java)6
-rw-r--r--src/com/android/dialer/list/SpeedDialFragment.java (renamed from src/com/android/dialer/list/PhoneFavoriteFragment.java)11
-rw-r--r--src/com/android/dialer/list/TileInteractionTeaserView.java4
5 files changed, 17 insertions, 22 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index c449e09bf..3f490069c 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -74,7 +74,7 @@ import com.android.dialer.list.DragDropController;
import com.android.dialer.list.ListsFragment;
import com.android.dialer.list.OnDragDropListener;
import com.android.dialer.list.OnListFragmentScrolledListener;
-import com.android.dialer.list.PhoneFavoriteFragment;
+import com.android.dialer.list.SpeedDialFragment;
import com.android.dialer.list.PhoneFavoriteTileView;
import com.android.dialer.list.PhoneFavoriteSquareTileView;
import com.android.dialer.list.RegularSearchFragment;
@@ -95,7 +95,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
OnListFragmentScrolledListener,
DialpadFragment.HostInterface,
ListsFragment.HostInterface,
- PhoneFavoriteFragment.HostInterface,
+ SpeedDialFragment.HostInterface,
OnDragDropListener, View.OnLongClickListener,
OnPhoneNumberPickerActionListener {
private static final String TAG = "DialtactsActivity";
@@ -207,7 +207,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
public void show() {
final Menu menu = getMenu();
final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents);
- // TODO: Check mPhoneFavoriteFragment.hasFrequents()
+ // TODO: Check mSpeedDialFragment.hasFrequents()
clearFrequents.setVisible(true);
super.show();
}
@@ -483,7 +483,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
return true;
case R.id.menu_clear_frequents:
// TODO: This should be enabled/disabled based on
- // PhoneFavoritesFragments.hasFrequents
+ // SpeedDialFragment.hasFrequents
ClearFrequentsDialog.show(getFragmentManager());
return true;
case R.id.menu_call_settings:
@@ -940,7 +940,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
public void onDroppedOnRemove() {}
/**
- * Allows the PhoneFavoriteFragment to attach the drag controller to mRemoveViewContainer
+ * Allows the SpeedDialFragment to attach the drag controller to mRemoveViewContainer
* once it has been attached to the activity.
*/
@Override
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index d6ea2ad43..676b3b075 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -65,13 +65,13 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste
private ViewPager mViewPager;
private ViewPagerAdapter mViewPagerAdapter;
- private PhoneFavoriteFragment mSpeedDialFragment;
+ private SpeedDialFragment mSpeedDialFragment;
private CallLogFragment mRecentsFragment;
private AllContactsFragment mAllContactsFragment;
private String[] mTabTitles;
- private PhoneFavoriteMergedAdapter mMergedAdapter;
+ private ShortcutCardsAdapter mMergedAdapter;
private CallLogAdapter mCallLogAdapter;
private CallLogQueryHandler mCallLogQueryHandler;
@@ -116,7 +116,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste
public Fragment getItem(int position) {
switch (position) {
case TAB_INDEX_SPEED_DIAL:
- mSpeedDialFragment = new PhoneFavoriteFragment();
+ mSpeedDialFragment = new SpeedDialFragment();
return mSpeedDialFragment;
case TAB_INDEX_RECENTS:
mRecentsFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL,
@@ -168,7 +168,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste
mCallLogAdapter = ObjectFactory.newCallLogAdapter(getActivity(), this,
new ContactInfoHelper(getActivity(), currentCountryIso), false, false);
- mMergedAdapter = new PhoneFavoriteMergedAdapter(getActivity(), this, mCallLogAdapter);
+ mMergedAdapter = new ShortcutCardsAdapter(getActivity(), this, mCallLogAdapter);
}
@Override
diff --git a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/ShortcutCardsAdapter.java
index 122e0629e..4cca20b3d 100644
--- a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
+++ b/src/com/android/dialer/list/ShortcutCardsAdapter.java
@@ -38,7 +38,7 @@ import com.android.dialer.list.SwipeHelper.SwipeHelperCallback;
* An adapter that displays call shortcuts from {@link com.android.dialer.calllog.CallLogAdapter}
* in the form of cards.
*/
-public class PhoneFavoriteMergedAdapter extends BaseAdapter {
+public class ShortcutCardsAdapter extends BaseAdapter {
private class CustomDataSetObserver extends DataSetObserver {
@Override
@@ -47,7 +47,7 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter {
}
}
- private static final String TAG = PhoneFavoriteMergedAdapter.class.getSimpleName();
+ private static final String TAG = ShortcutCardsAdapter.class.getSimpleName();
private final CallLogAdapter mCallLogAdapter;
private final ListsFragment mFragment;
@@ -93,7 +93,7 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter {
}
};
- public PhoneFavoriteMergedAdapter(Context context,
+ public ShortcutCardsAdapter(Context context,
ListsFragment fragment,
CallLogAdapter callLogAdapter) {
final Resources resources = context.getResources();
diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java
index 05e2d44d4..9de75bb64 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/SpeedDialFragment.java
@@ -50,14 +50,9 @@ import java.util.ArrayList;
import java.util.HashMap;
/**
- * Fragment for Phone UI's favorite screen.
- *
- * This fragment contains three kinds of contacts in one screen: "starred", "frequent", and "all"
- * contacts. To show them at once, this merges results from {@link com.android.contacts.common.list.ContactTileAdapter} and
- * {@link com.android.contacts.common.list.PhoneNumberListAdapter} into one unified list using {@link PhoneFavoriteMergedAdapter}.
- * A contact filter header is also inserted between those adapters' results.
+ * This fragment displays the user's favorite/frequent contacts in a grid.
*/
-public class PhoneFavoriteFragment extends Fragment implements OnItemClickListener,
+public class SpeedDialFragment extends Fragment implements OnItemClickListener,
PhoneFavoritesTileAdapter.OnDataSetChangedForAnimationListener {
/**
@@ -69,7 +64,7 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen
*/
private static final long KEY_REMOVED_ITEM_HEIGHT = Long.MAX_VALUE;
- private static final String TAG = PhoneFavoriteFragment.class.getSimpleName();
+ private static final String TAG = SpeedDialFragment.class.getSimpleName();
private static final boolean DEBUG = false;
private int mAnimationDuration;
diff --git a/src/com/android/dialer/list/TileInteractionTeaserView.java b/src/com/android/dialer/list/TileInteractionTeaserView.java
index 6e70fd186..fd5ed3425 100644
--- a/src/com/android/dialer/list/TileInteractionTeaserView.java
+++ b/src/com/android/dialer/list/TileInteractionTeaserView.java
@@ -31,7 +31,7 @@ public class TileInteractionTeaserView extends FrameLayout {
private int mTextTop;
private int mAnimatedHeight = -1;
- private PhoneFavoriteMergedAdapter mAdapter;
+ private ShortcutCardsAdapter mAdapter;
public TileInteractionTeaserView(final Context context) {
this(context, null);
@@ -91,7 +91,7 @@ public class TileInteractionTeaserView extends FrameLayout {
return prefs.getBoolean(KEY_TILE_INTERACTION_TEASER_SHOWN, true);
}
- public void setAdapter(PhoneFavoriteMergedAdapter adapter) {
+ public void setAdapter(ShortcutCardsAdapter adapter) {
mAdapter = adapter;
}