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

Commit 450a3a16 authored by Jim Miller's avatar Jim Miller
Browse files

Fix bug where Keyguard's emergencydialer wasn't being launched with a userid.

Fixes bug 8374423

Change-Id: Iafbcefa431105202b68b3444cb1b42271fe0ccda
parent ae19d2ca
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.telephony.TelephonyManager;
import android.util.AttributeSet;
import android.view.View;
@@ -104,7 +105,8 @@ public class EmergencyButton extends Button {
            Intent intent = new Intent(ACTION_EMERGENCY_DIAL);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                    | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
            getContext().startActivity(intent);
            getContext().startActivityAsUser(intent,
                    new UserHandle(mLockPatternUtils.getCurrentUser()));
        }
    }