While resolveActivity is used to determine whether an Intent can be handled by something, this doesn't catch the case of explicit intents whose activity class doesn't exist. Here we check for it through PackageManager.queryIntentActivities instead for existing zen rules (if they were added when the activity exists, but it no longer does).
For new rules, check the validity of the activity for external rules before adding them to the list.
Bug: 238144390
Test: manual via DND app
Change-Id: Ia920ca792f9c17a5d684baf877c882ce7fadffd6
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
start the deep link Activity.
Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
Merged-In: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.
Bug: 261678674
Bug: 250589026
Test: manual visual
Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
Merged-In: I662df6cb287361b135e2c596abe946ddeb03bda4
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.
Bug: 261678674
Bug: 250589026
Test: manual visual
Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
Merged-In: I662df6cb287361b135e2c596abe946ddeb03bda4
This is not a design which could resolve the issue, but try to improve
it through reducing the time blocking on BroadcastReceiver and reducing
the happening of ANR.
Bug: 262209170
Test: local and auto
Change-Id: Idec4da3d1deaffb121a5c7a73aeb84b4b0331374
- Add a new field elapsed_time_millis to keep the elapsed time
since setup wizard finished.
Fixes: 260660970
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Change-Id: I28d13c4987ae1e4ef12eaff27e26a5121cf8093b
To improve security, calling app must be granted Uri permission
if it sets FLAG_GRANT_READ/WRITE_URI_PERMISSION in the Intent of
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY.
Bug: 250589026
Test: manual
Change-Id: I48f88c662b843212b1066369badff84cf98935a8
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.
Bug: 261678674
Bug: 250589026
Test: manual visual
Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
- Due to unclear root cause of optimization mode being reset after
reboot, update the setup logic from deferred background thread to
main thread, to avoid any possible background task unexecuted case.
Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I2de2181321712f89fadc04bf5000aea91a01485a
"One" and "1" are not same, such as "1st place" vs "a
place". Also in many languages, plurals expression is different with English, for more detail please check: go/android-i18n-plurals.
So in string res file, replace "one" with excat value "1" is a more
proper way.
Test: Existing unit tests still pass.
Bug: 199230342
Change-Id: I832abc38afc5d8816fa803865c25e6017cffa2c6
This reverts commit ea1580f92b.
Reason for revert:
1. Search result trampoline should have that result sent back to the
reply target of the original activity.
2. To leverage the behavior of handheld's deep link case, large
screen's deep link should forward the result.
Change-Id: I55303070e35fc9430063655e0a9a0fd72e0823ac
If an Activity is not exported, the Activity still can be
launched by components of the same application, applications
with the same user ID, or privileged system components.
Bug: 261678674
Bug: 250589026
Test: manual visual
Launcher -> context menu -> Wallpaper & style
Change-Id: I662df6cb287361b135e2c596abe946ddeb03bda4
Merged-In: I662df6cb287361b135e2c596abe946ddeb03bda4