summaryrefslogtreecommitdiff
path: root/core/java/android/debug/AdbNotifications.java
Commit message (Collapse)AuthorAgeFilesLines
* Don't attach PendingIntent if settings app is hidden.Joshua Duong2020-05-151-5/+14
| | | | | | | | | | | | | | | The settings app may not be available. In that case, just show the adb notification without a PendingIntent. Bug: 156453114 Test: atest AdbNotificationsTest Test: With USB debugging enabled, install TestDPC, and use it to hide settings app. Unplug and replug USB. USB debugging notification shows up and clicking it does nothing. Change-Id: Ie29d2c425c05bce9371600d76e4eb2eaba692fd7 Change-Id: Ie5f746cbc7b8a32fc280177bf281a9e973c8df12
* Fix PendingIntent hijacking for adb notifications.Joshua Duong2020-04-171-0/+90
Use an explicit intent and set PendingIntent.FLAG_IMMUTABLE to prevent someone from modifying the intent from PendingIntent.send(...). Bug: 153356209 Test: atest AdbNotificationsTest Test: In bug, install and launch the PoC apk and give it notification permissions. Then, with USB/Wifi debugging enabled, disconnect and connect the device to create the adb notification. the PoC apk should not have permission to display information from content://com.android.settings.files/my_cache/NOTICE.html. Change-Id: Ie49aa3cf9b33168cf1435fc2427e95aac7f4609b (cherry picked from commit 2c038814591d7e3d73b2b277db504a5555732456) Exempt-From-Owner-Approval: approved in master