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

Commit 051bd7ea authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Show InCallScreen when swiping phone affordance while in a call" into lmp-dev

parents 989b68e8 583a2024
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