am 6d4dac74: Merge "Fix bug where Keyguard\'s emergencydialer wasn\'t being launched with a userid." into jb-mr2-dev

* commit '6d4dac74235972035a3a9109a4224e04a88039cd':
  Fix bug where Keyguard's emergencydialer wasn't being launched with a userid.
This commit is contained in:
Jim Miller
2013-03-14 00:02:29 +00:00
committed by Android Git Automerger

View File

@@ -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()));
}
}