Add intent fields when launching instant app.
- add browseable category, package name, and new task flag. Change-Id: Ie558f5885b5f0f78c88241de7c2d7a21cfb9d0fe Fixes: 74131502 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user