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

Commit 9264b265 authored by twyen's avatar twyen Committed by Copybara-Service
Browse files

Prevent PreCallActivity from showing in lockscreen if it is not started in the lockscreen

Bug: 69812359
Test: PreCallActivityTest
PiperOrigin-RevId: 177193665
Change-Id: Ic61819b8456ee22c01228d6be2255b3f2c1e418a
parent 2c6803d4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.dialer.precall.impl;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.KeyguardManager;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
@@ -34,9 +35,11 @@ public class PreCallActivity extends Activity {
    super.onCreate(savedInstanceState);
    preCallCoordinator = new PreCallCoordinatorImpl(this);
    preCallCoordinator.onCreate(getIntent(), savedInstanceState);
    if (getSystemService(KeyguardManager.class).isKeyguardLocked()) {
        getWindow().addFlags(LayoutParams.FLAG_SHOW_WHEN_LOCKED);

    }
  }

  @Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {