Revert "[RESTRICT AUTOMERGE] Fix permission issue in legacy shortcut" am: dedca445bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23557759 Change-Id: Ib5445adcc05cccf854f941ed150f8e81e06b2f4a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -145,18 +145,6 @@ public class PackageManagerHelper {
|
|||||||
* any permissions
|
* any permissions
|
||||||
*/
|
*/
|
||||||
public boolean hasPermissionForActivity(Intent intent, String srcPackage) {
|
public boolean hasPermissionForActivity(Intent intent, String srcPackage) {
|
||||||
// b/270152142
|
|
||||||
if (Intent.ACTION_CHOOSER.equals(intent.getAction())) {
|
|
||||||
final Bundle extras = intent.getExtras();
|
|
||||||
if (extras == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// If given intent is ACTION_CHOOSER, verify srcPackage has permission over EXTRA_INTENT
|
|
||||||
intent = extras.getParcelable(Intent.EXTRA_INTENT, Intent.class);
|
|
||||||
if (intent == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ResolveInfo target = mPm.resolveActivity(intent, 0);
|
ResolveInfo target = mPm.resolveActivity(intent, 0);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
// Not a valid target
|
// Not a valid target
|
||||||
|
|||||||
Reference in New Issue
Block a user