Loading src/com/android/dialer/DialtactsActivity.java +4 −9 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -610,9 +608,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())); Loading src/com/android/dialer/calllog/CallLogListItemHelper.java +0 −4 Original line number Diff line number Diff line Loading @@ -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. */ Loading src/com/android/dialer/list/PhoneFavoriteFragment.java +2 −21 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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()"); Loading Loading @@ -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; } Loading Loading
src/com/android/dialer/DialtactsActivity.java +4 −9 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -610,9 +608,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())); Loading
src/com/android/dialer/calllog/CallLogListItemHelper.java +0 −4 Original line number Diff line number Diff line Loading @@ -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. */ Loading
src/com/android/dialer/list/PhoneFavoriteFragment.java +2 −21 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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()"); Loading Loading @@ -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; } Loading