Merge "Secure the pendingIntent in SearchWidgetProvider." am: 6f94db4286 am: 57be39752d am: a42ed2b8dc am: 1c8f4163cf am: a948aa19aa
Original change: https://android-review.googlesource.com/c/platform/packages/apps/QuickSearchBox/+/1818517
Secure the pendingIntent in SearchWidgetProvider.
+ Pass PendingIntent.FLAG_IMMUTABLE to PendingIntent.getActivity
+ Assign the package name for pending intent, so that the intent
only can launch the QuicSearchBox app.
Fix: 184046278
Test: manual
+ Verified the above bug is fixes the above bug,
+ Installed the app and verified search is working.
$ m
$ ls -l ./out/target/product/bonito/product/app/QuickSearchBox/QuickSearchBox.apk-rw-r--r-- 1 rtenneti primarygroup 701136 Sep 3 14:52 ./out/target/product/bonito/product/app/QuickSearchBox/QuickSearchBox.apk
$ adb install -t ./out/target/product/bonito/product/app/QuickSearchBox/QuickSearchBox.apk
Performing Streamed Install
Success
$ make QuickSearchBoxTests
$ ls -l out/target/product/bonito/testcases/QuickSearchBoxTests/arm64/QuickSearchBox*
-rw-r--r-- 1 rtenneti primarygroup 33175 Sep 3 16:40 out/target/product/bonito/testcases/QuickSearchBoxTests/arm64/QuickSearchBoxTests.apk
$ adb shell am instrument -w com.android.quicksearchbox.tests
com.android.quicksearchbox.CachingIconLoaderTest:.
com.android.quicksearchbox.LevenshteinFormatterTest:.........................
com.android.quicksearchbox.PackageIconLoaderTest:..
com.android.quicksearchbox.SuggestionUtilsTest:......
com.android.quicksearchbox.util.CachedLaterTest:......
com.android.quicksearchbox.util.LevenshteinDistanceTest:.....
com.android.quicksearchbox.util.PerNameExecutorTest:...
com.android.quicksearchbox.util.PriorityThreadFactoryTest:.
com.android.quicksearchbox.util.SingleThreadNamedTaskExecutorTest:.
Test results for InstrumentationTestRunner=.........................................
.........
Time: 0.277
OK (50 tests)
Change-Id: I8da08abc8acb46b6369022fde9e47c0f11020e46
(cherry picked from commit 3ecc851a474532d4e3bdc077986286ecb54e2421)
1 file changed