From ae487ada1969c32e7bbd32d8a83fc587506cd51c Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Tue, 14 Sep 2021 17:22:43 -0700 Subject: [DO NOT MERGE] AOSP/Calendar - Fix closing of system dialogs broadcast without permission. Deleted closeNotificationShade method thus not invoking ACTION_CLOSE_SYSTEM_DIALOGS intent. Test: manual - build tests, unit tests, and CTS tests were conducted using the following commands: $ make Calendar $ make CalendarTests -j $ adb install -r -t -d out/target/product/bonito/product/app/Calendar/Calendar.apk Success $ adb install -r -t -d out/target/product/bonito/testcases/CalendarTests/arm64/CalendarTests.apk Success $ adb shell am instrument -w com.android.calendar.tests General CTS Tests: $ tools/cts-tradefed cts-tf > run cts -m CtsProviderTestCases The following CTS test results are same as before the change: ================= Results ================== =============== Consumed Time ============== arm64-v8a CtsProviderTestCases: 15m 17s Total aggregated tests run time: 15m 17s ============== TOP 1 Slow Modules ============== arm64-v8a CtsProviderTestCases: 0.41 tests/sec [376 tests / 917885 msec] ============== Modules Preparation Times ============== arm64-v8a CtsProviderTestCases => prep = 4124 ms || clean = 1569 ms Total preparation time: 4s || Total tear down time: 1s ======================================================= =============== Summary =============== Total Run time: 16m 48s 1/1 modules completed Total Tests : 376 PASSED : 362 FAILED : 0 IGNORED : 6 ASSUMPTION_FAILURE: 8 ============== End of Results ============== .../bug_190403923$ adb install -r -t -d ./poc.apk Performing Streamed Install Success .../bug_190403923$ adb shell am start -n com.example.poc/.MainActivity Starting: Intent { cmp=com.example.poc/.MainActivity } .../bug_190403923$ adb logcat -d | grep AutofillManagerService Bug: 190403923 Change-Id: I47f3c5845d960c1f7515282af4b757b0b9e9ae8e --- src/com/android/calendar/alerts/AlertReceiver.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/com/android/calendar/alerts/AlertReceiver.java b/src/com/android/calendar/alerts/AlertReceiver.java index ce80cae1..ee0c508d 100644 --- a/src/com/android/calendar/alerts/AlertReceiver.java +++ b/src/com/android/calendar/alerts/AlertReceiver.java @@ -80,7 +80,6 @@ public class AlertReceiver extends BroadcastReceiver { if (AlertService.DEBUG) { Log.d(TAG, "onReceive: a=" + intent.getAction() + " " + intent.toString()); } - closeNotificationShade(context); } public static NotificationWrapper makeBasicNotification(Context context, String title, @@ -115,9 +114,4 @@ public class AlertReceiver extends BroadcastReceiver { } return notificationBuilder.getNotification(); } - - private void closeNotificationShade(Context context) { - Intent closeNotificationShadeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); - context.sendBroadcast(closeNotificationShadeIntent); - } } -- cgit v1.2.3