Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc2d9285 authored by herriojr's avatar herriojr
Browse files

Fix FileManager Interaction

After much thought about this last night, I decided that we can't
handle making sure the situation in
http://developer.android.com/training/basics/intents/sending.html#StartActivity
can actually be handled without possibly making a bad experience in
other situations (such as FileManager doing its own resolving).

This will now only pop it up when we query a function which could
possibly return the resolver like how it was before  the previous change.

Change-Id: I2e458a80d3e3f7c358949c210b5372933910ac7a
Issue-Id: CYNGNOS-1152
parent c2394c5f
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -3351,6 +3351,17 @@ public class PackageManagerService extends IPackageManager.Stub {
                    return ri;
                }
                return mResolveInfo;
            } else if (shouldIncludeResolveActivity(intent)) {
                if (userId != 0) {
                    ResolveInfo ri = new ResolveInfo(mResolveInfo);
                    ri.activityInfo = new ActivityInfo(ri.activityInfo);
                    ri.activityInfo.applicationInfo = new ApplicationInfo(
                            ri.activityInfo.applicationInfo);
                    ri.activityInfo.applicationInfo.uid = UserHandle.getUid(userId,
                            UserHandle.getAppId(ri.activityInfo.applicationInfo.uid));
                    return ri;
                }
                return mResolveInfo;
            }
        }
        return null;
@@ -3649,9 +3660,6 @@ public class PackageManagerService extends IPackageManager.Stub {
                    result.add(resolveInfo);
                    Collections.sort(result, mResolvePrioritySorter);
                }
                if (result.size() == 0 && shouldIncludeResolveActivity(intent)) {
                    result.add(mResolveInfo);
                }
                return result;
            }
            final PackageParser.Package pkg = mPackages.get(pkgName);