From 2b63359e974a2a67b68ea75d4a44a64e0dadbcfe Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 13 May 2015 18:33:23 -0700 Subject: Delete unused code in CallDetailActivity. - I don't know of any affordances in call detail to make a call, so the onKeyDown code seems to be superfluous. - No references to ViewEntry or forceLeftToRight. Bug: 20433758 Change-Id: Idbf6ffb81d3697b27cb51eda346b46eb5d083878 --- src/com/android/dialer/CallDetailActivity.java | 56 -------------------------- 1 file changed, 56 deletions(-) (limited to 'src/com/android/dialer') diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index a509c7fa1..401c2ae80 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -290,26 +290,6 @@ public class CallDetailActivity extends Activity { return uris; } - @Override - public boolean onKeyDown(int keyCode, KeyEvent event) { - switch (keyCode) { - case KeyEvent.KEYCODE_CALL: { - // Make sure phone isn't already busy before starting direct call - TelephonyManager tm = (TelephonyManager) - getSystemService(Context.TELEPHONY_SERVICE); - if (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) { - DialerUtils.startActivityWithErrorToast(this, - IntentUtil.getCallIntent( - Uri.fromParts(PhoneAccount.SCHEME_TEL, mNumber, null)), - R.string.call_not_available); - return true; - } - } - } - - return super.onKeyDown(keyCode, event); - } - /** * Update user interface with details of given call. * @@ -550,33 +530,6 @@ public class CallDetailActivity extends Activity { false /* darkTheme */, true /* isCircular */, request); } - static final class ViewEntry { - public final String text; - public final Intent primaryIntent; - /** The description for accessibility of the primary action. */ - public final String primaryDescription; - - public CharSequence label = null; - /** Icon for the secondary action. */ - public int secondaryIcon = 0; - /** Intent for the secondary action. If not null, an icon must be defined. */ - public Intent secondaryIntent = null; - /** The description for accessibility of the secondary action. */ - public String secondaryDescription = null; - - public ViewEntry(String text, Intent intent, String description) { - this.text = text; - primaryIntent = intent; - primaryDescription = description; - } - - public void setSecondaryAction(int icon, Intent intent, String description) { - secondaryIcon = icon; - secondaryIntent = intent; - secondaryDescription = description; - } - } - @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.call_details_options, menu); @@ -643,13 +596,4 @@ public class CallDetailActivity extends Activity { private void closeSystemDialogs() { sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); } - - /** Returns the given text, forced to be left-to-right. */ - private static CharSequence forceLeftToRight(CharSequence text) { - StringBuilder sb = new StringBuilder(); - sb.append(LEFT_TO_RIGHT_EMBEDDING); - sb.append(text); - sb.append(POP_DIRECTIONAL_FORMATTING); - return sb.toString(); - } } -- cgit v1.2.3