Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5051b2c2 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 0ecb265c on remote branch

Change-Id: Ia836e10068cc1f46101c6bcdcb4eafe02145830b
parents 6eb0b608 0ecb265c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -533,6 +533,7 @@
    <string name="open_now">Open now</string>
    <!-- Displayed when a place is closed. -->
    <string name="closed_now">Closed now</string>
    <string name="call_failed_due_to_validate_number">Unable to make video call, incorrect number format</string>
    <string name="call_state_dialing">Dialing</string>
    <string name="call_state_holding">Holding</string>
    <string name="call_state_active">Active</string>
+1 −0
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD
    @Override
    protected void onDestroy() {
        Log.d(this, "onDestroy()...  this = " + this);
        InCallLowBatteryListener.getInstance().onDestroyInCallActivity();
        InCallPresenter.getInstance().unsetActivity(this);
        InCallPresenter.getInstance().updateIsChangingConfigurations();
        super.onDestroy();
+25 −1
Original line number Diff line number Diff line
@@ -170,6 +170,28 @@ public class InCallLowBatteryListener implements CallList.Listener, InCallDetail
        mLowBatteryMap.remove(call);
    }

    /**
      * This API handles InCallActivity destroy when low battery dialog is showing
      */
    public void onDestroyInCallActivity() {
        if (dismissPendingDialogs()) {
            Log.i(this, "onDestroyInCallActivity dismissed low battery dialog");

            /* Activity is destroyed when low battery dialog is showing, possibly
               by removing the activity from recent tasks list etc. Handle this by
               dismissing the existing low battery dialog and marking the entry
               against the call in low battery map that the low battery indication
               needs to be reprocessed for eg. when user brings back the call to
               foreground by pulling it from notification bar */
            Call call = mPrimaryCallTracker.getPrimaryCall();
            if (call == null) {
                Log.w(this, "onDestroyInCallActivity call is null");
                return;
            }
            mLowBatteryMap.replace(call, PROCESS_LOW_BATTERY);
        }
    }

    /**
     * This API conveys if incall experience is showing or not.
     *
@@ -512,10 +534,12 @@ public class InCallLowBatteryListener implements CallList.Listener, InCallDetail
     * This method dismisses the low battery dialog and
     * returns true if dialog is dimissed else false
     */
    public void dismissPendingDialogs() {
    public boolean dismissPendingDialogs() {
        if (isLowBatteryDialogShowing()) {
            mAlert.dismiss();
            mAlert = null;
            return true;
        }
        return false;
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -310,6 +310,9 @@ public class InCallMessageController implements InCallSubstateListener, VideoEve
         case QtiCallConstants.CALL_FAIL_EXTRA_CODE_LOCAL_LOW_BATTERY:
             QtiCallUtils.displayToast(mContext, R.string.call_failed_due_to_low_battery);
             break;
         case QtiCallConstants.CALL_FAIL_EXTRA_CODE_LOCAL_VALIDATE_NUMBER:
             QtiCallUtils.displayToast(mContext, R.string.call_failed_due_to_validate_number);
             break;
         default:
             break;
       }
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@
            android:layout_height="match_parent"
            android:layout_gravity="bottom|right"
            android:layout_weight="1"
            android:visibility="gone"
            android:background="@drawable/floating_action_button"
            android:contentDescription="@string/action_menu_dialpad_button"
            android:src="@drawable/ic_add_group_holo_dark"/>
Loading