diff options
| author | Brad Ebinger <breadley@google.com> | 2020-05-06 16:18:12 -0700 |
|---|---|---|
| committer | Anis Assi <anisassi@google.com> | 2020-06-30 16:10:59 -0700 |
| commit | 8a7cd703527515da823ceaffa6411c72f0d10d1f (patch) | |
| tree | d17b0dee59e07e94bddbc2ba51fcefe7a05aae64 | |
| parent | e64fcc2a26a0e4b08c0cad4466af997c447e3661 (diff) | |
| download | platform_packages_services_Telephony-oreo-security-release.tar.gz platform_packages_services_Telephony-oreo-security-release.tar.bz2 platform_packages_services_Telephony-oreo-security-release.zip | |
Specify the component for the ACTION_SHOW_ECM_EXIT_DIALOG Intentandroid-security-8.0.0_r54android-security-8.0.0_r53android-security-8.0.0_r52android-8.0.0_r51android-8.0.0_r50oreo-security-release
Specify the component for the ACTION_SHOW_ECM_EXIT_DIALOG intent
so it can not be intercepted by a malicious application and modified.
Bug: 155094269
Test: manually trigger ECBM dialog and exit.
Merged-In: Id5df0b428bd7e24aa11fb9dd4c920d1019f1b389
Change-Id: Id5df0b428bd7e24aa11fb9dd4c920d1019f1b389
(cherry picked from commit 11c41d321d0c2dc3631f37d2f8f3ebc745f454d2)
| -rw-r--r-- | src/com/android/phone/EmergencyCallbackModeService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/phone/EmergencyCallbackModeService.java b/src/com/android/phone/EmergencyCallbackModeService.java index a07f7aa93..86f8fe607 100644 --- a/src/com/android/phone/EmergencyCallbackModeService.java +++ b/src/com/android/phone/EmergencyCallbackModeService.java @@ -189,8 +189,10 @@ public class EmergencyCallbackModeService extends Service { // PendingIntent to launch Emergency Callback Mode Exit activity if the user selects // this notification - PendingIntent contentIntent = PendingIntent.getActivity(this, 0, - new Intent(EmergencyCallbackModeExitDialog.ACTION_SHOW_ECM_EXIT_DIALOG), 0); + Intent intent = new Intent(this, EmergencyCallbackModeExitDialog.class); + intent.setAction(EmergencyCallbackModeExitDialog.ACTION_SHOW_ECM_EXIT_DIALOG); + PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, + PendingIntent.FLAG_IMMUTABLE); builder.setContentIntent(contentIntent); // Format notification string |
