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

Commit 583a2024 authored by Yorke Lee's avatar Yorke Lee
Browse files

Show InCallScreen when swiping phone affordance while in a call

Bug: 16344259

Change-Id: Ifd7975295d9c98af302b5ce769076152acf59939
parent fdee9b44
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -25,9 +25,12 @@ import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.os.AsyncTask;
import android.os.RemoteException;
import android.os.UserHandle;
import android.phone.PhoneManager;
import android.provider.MediaStore;
import android.telecomm.TelecommManager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
@@ -246,8 +249,19 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
    }

    public void launchPhone() {
        TelecommManager tm = TelecommManager.from(mContext);
        if (tm.isInAPhoneCall()) {
            final PhoneManager pm = (PhoneManager) mContext.getSystemService(Context.PHONE_SERVICE);
            AsyncTask.execute(new Runnable() {
                @Override
                public void run() {
                    pm.showCallScreen(false /* showDialpad */);
                }
            });
        } else {
            mActivityStarter.startActivity(PHONE_INTENT, false /* dismissShade */);
        }
    }


    @Override