Merge "Add intent fields when launching instant app." into pi-dev am: dce675c158

am: 5675610456

Change-Id: Ie23a11bc172a829e95f66102dfa052ecdaf61723
This commit is contained in:
Doris Ling
2018-03-07 05:16:37 +00:00
committed by android-build-merger
2 changed files with 6 additions and 0 deletions

View File

@@ -147,7 +147,10 @@ public class InstantAppButtonsPreferenceController extends BasePreferenceControl
if (!TextUtils.isEmpty(mLaunchUri)) {
installButton.setVisibility(View.GONE);
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setPackage(mPackageName);
intent.setData(Uri.parse(mLaunchUri));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
launchButton.setOnClickListener(v -> mParent.startActivity(intent));
} else {
launchButton.setVisibility(View.GONE);