diff options
author | Yorke Lee <yorkelee@google.com> | 2013-08-09 15:16:10 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-08-09 15:33:36 -0700 |
commit | f420a5344995b2c450379159f679809690bc9880 (patch) | |
tree | 9d20528e4b423de3babbdcfa7527e79ce0d8d827 /src | |
parent | 15ef3e1d3772d9e35182572fed9b0f1c7c958547 (diff) |
Clean up todos in Dialer
Change-Id: I336373f089d1956606451e320c103d53bd737264
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 13 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemHelper.java | 4 | ||||
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteFragment.java | 23 |
3 files changed, 6 insertions, 34 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 726c17687..52c4a5b59 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -81,9 +81,6 @@ import java.util.ArrayList; /** * The dialer tab's title is 'phone', a more common name (see strings.xml). - * - * TODO krelease: All classes currently prefixed with New will replace the original classes or - * be renamed more appropriately before shipping. */ public class DialtactsActivity extends TransactionSafeActivity implements View.OnClickListener, DialpadFragment.OnDialpadQueryChangedListener, PopupMenu.OnMenuItemClickListener, @@ -370,6 +367,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O final PopupMenu popupMenu = new PopupMenu(DialtactsActivity.this, view); final Menu menu = popupMenu.getMenu(); popupMenu.inflate(R.menu.dialtacts_options); + final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents); + clearFrequents.setEnabled(mPhoneFavoriteFragment.hasFrequents()); popupMenu.setOnMenuItemClickListener(this); popupMenu.show(); break; @@ -379,9 +378,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O break; case R.id.call_history_on_dialpad_button: case R.id.call_history_button: - // TODO krelease: This should start an intent with content type - // CallLog.Calls.CONTENT_TYPE, once the intent filters for the call log activity - // is enabled + // Use explicit CallLogActivity intent instead of ACTION_VIEW + + // CONTENT_TYPE, so that we always open our call log from our dialer final Intent intent = new Intent(this, CallLogActivity.class); startActivity(intent); break; @@ -606,9 +604,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O * @param intent Intent that contains information about which tab should be selected */ private void displayFragment(Intent intent) { - // TODO krelease: Make navigation via intent work by displaying the correct fragment - // as appropriate. - // If we got here by hitting send and we're in call forward along to the in-call activity boolean recentCallsRequest = Calls.CONTENT_TYPE.equals(intent.resolveType( getContentResolver())); diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java index fdebeb166..23366e469 100644 --- a/src/com/android/dialer/calllog/CallLogListItemHelper.java +++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java @@ -27,10 +27,6 @@ import com.android.dialer.R; /** * Helper class to fill in the views of a call log entry. - * TODO krelease: The only difference between this and the original is that we don't touch - * divider views, which are not present in the new dialer. Once the new dialer replaces - * the old one, we can replace it entirely. Otherwise we would have redundant divider=null - * checks all over the place. */ /* package */class CallLogListItemHelper { /** Helper for populating the details of a phone call. */ diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index 64a9b84d2..3cff901a5 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -135,7 +135,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen private OnListFragmentScrolledListener mActivityScrollListener; private PhoneFavoriteMergedAdapter mAdapter; private PhoneFavoritesTileAdapter mContactTileAdapter; - private PhoneNumberListAdapter mAllContactsAdapter; private CallLogAdapter mCallLogAdapter; private CallLogQueryHandler mCallLogQueryHandler; @@ -161,8 +160,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen new ContactTileLoaderListener(); private final ScrollListener mScrollListener = new ScrollListener(); - private boolean mOptionsMenuHasFrequents; - @Override public void onAttach(Activity activity) { if (DEBUG) Log.d(TAG, "onAttach()"); @@ -245,24 +242,8 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen return listLayout; } - - // TODO krelease: update the options menu when displaying the popup menu instead. We could - // possibly get rid of this method entirely. - private boolean isOptionsMenuChanged() { - return mOptionsMenuHasFrequents != hasFrequents(); - } - - // TODO krelease: Configure the menu items properly. Since the menu items show up as a PopupMenu - // rather than a normal actionbar menu, the initialization should be done there. - /* - @Override - public void onPrepareOptionsMenu(Menu menu) { - final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents); - mOptionsMenuHasFrequents = hasFrequents(); - clearFrequents.setVisible(mOptionsMenuHasFrequents); - }*/ - - private boolean hasFrequents() { + public boolean hasFrequents() { + if (mContactTileAdapter == null) return false; return mContactTileAdapter.getNumFrequents() > 0; } |