2828
2929import android .content .Context ;
3030import android .content .Intent ;
31- import android .os .PowerManager ;
3231import android .os .RemoteException ;
3332import android .os .ServiceManager ;
3433import android .view .IWindowManager ;
@@ -64,7 +63,6 @@ public class InCallPresenter implements CallList.Listener {
6463 private Context mContext ;
6564 private CallList mCallList ;
6665 private InCallActivity mInCallActivity ;
67- private InCallCardActivity mInCallCardActivity ;
6866 private InCallState mInCallState = InCallState .NO_CALLS ;
6967 private AccelerometerListener mAccelerometerListener ;
7068 private ProximitySensor mProximitySensor ;
@@ -179,12 +177,6 @@ public void tearDown() {
179177 }
180178
181179 private void attemptFinishActivity () {
182- // Finish our presenter card in all cases, we won't need it anymore whatever might
183- // happen.
184- if (mInCallCardActivity != null ) {
185- mInCallCardActivity .finish ();
186- }
187-
188180 final boolean doFinish = (mInCallActivity != null && isActivityStarted ());
189181 Log .i (this , "Hide in call UI: " + doFinish );
190182
@@ -198,10 +190,6 @@ private void attemptFinishActivity() {
198190 }
199191 }
200192
201- public void setCardActivity (InCallCardActivity inCallCardActivity ) {
202- mInCallCardActivity = inCallCardActivity ;
203- }
204-
205193 /**
206194 * Sends modify call request to the other party.
207195 *
@@ -833,21 +821,13 @@ private void startUi(InCallState inCallState) {
833821 mCallUiInBackground = pm .isScreenOn () && !isKeyguardShowing ;
834822 }
835823
836- final PowerManager pm = (PowerManager ) mContext .getSystemService (Context .POWER_SERVICE );
837- // If the screen is on, we'll prefer to not interrupt the user too much and slide in a card
838- if (pm .isScreenOn ()) {
839- Intent intent = new Intent (mContext , InCallCardActivity .class );
840- intent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
841- mContext .startActivity (intent );
842- } else {
843- mStatusBarNotifier .updateNotificationAndLaunchIncomingCallUi (inCallState , mCallList , mCallUiInBackground );
844- }
824+ mStatusBarNotifier .updateNotificationAndLaunchIncomingCallUi (inCallState , mCallList , mCallUiInBackground );
845825 }
846826
847827 /**
848- * Starts the incoming call Ui immediately used by the incoming call
849- * notification sent from framework's notification mechanism
850- */
828+ * Starts the incoming call Ui immediately used by the incoming call
829+ * notification sent from framework's notification mechanism
830+ */
851831 public void startIncomingCallUi () {
852832 // Update the notification and UI this time with fullscreen intent
853833 // First cancel the actual notification and then update
@@ -856,13 +836,6 @@ public void startIncomingCallUi() {
856836 InCallState .INCALL , mCallList , false );
857837 }
858838
859- /**
860- * Starts the incoming call Ui immediately, bypassing the card UI
861- */
862- public void startIncomingCallUi (InCallState inCallState ) {
863- mStatusBarNotifier .updateNotificationAndLaunchIncomingCallUi (inCallState , mCallList , mCallUiInBackground );
864- }
865-
866839 /**
867840 * Checks to see if both the UI is gone and the service is disconnected. If so, tear it all
868841 * down.
0 commit comments