use of com.android.tools.idea.run.activity.StartActivityFlagsProvider in project intellij by bazelbuild.
the class BlazeAndroidBinaryNormalBuildRunContext method getApplicationLaunchTask.
@Override
public LaunchTask getApplicationLaunchTask(LaunchOptions launchOptions, @Nullable Integer userId, AndroidDebugger androidDebugger, AndroidDebuggerState androidDebuggerState, ProcessHandlerLaunchStatus processHandlerLaunchStatus) throws ExecutionException {
final StartActivityFlagsProvider startActivityFlagsProvider = new DefaultStartActivityFlagsProvider(androidDebugger, androidDebuggerState, project, launchOptions.isDebug(), UserIdHelper.getFlagsFromUserId(userId));
BlazeAndroidDeployInfo deployInfo;
try {
deployInfo = buildStep.getDeployInfo();
} catch (ApkProvisionException e) {
throw new ExecutionException(e);
}
return BlazeAndroidBinaryApplicationLaunchTaskProvider.getApplicationLaunchTask(project, applicationIdProvider, deployInfo.getMergedManifestFile(), configState, startActivityFlagsProvider, processHandlerLaunchStatus);
}
use of com.android.tools.idea.run.activity.StartActivityFlagsProvider in project android by JetBrains.
the class AndroidRunConfiguration method getApplicationLaunchTask.
@Nullable
@Override
protected LaunchTask getApplicationLaunchTask(@NotNull ApplicationIdProvider applicationIdProvider, @NotNull AndroidFacet facet, boolean waitForDebugger, @NotNull LaunchStatus launchStatus) {
LaunchOptionState state = getLaunchOptionState(MODE);
assert state != null;
String extraFlags = ACTIVITY_EXTRA_FLAGS;
StartActivityFlagsProvider startActivityFlagsProvider;
if (facet.getProjectType() == PROJECT_TYPE_INSTANTAPP) {
startActivityFlagsProvider = new InstantAppStartActivityFlagsProvider();
} else {
startActivityFlagsProvider = new DefaultStartActivityFlagsProvider(getAndroidDebuggerContext().getAndroidDebugger(), getAndroidDebuggerContext().getAndroidDebuggerState(), getProfilerState(), getProject(), waitForDebugger, extraFlags);
}
try {
return state.getLaunchTask(applicationIdProvider.getPackageName(), facet, startActivityFlagsProvider, getProfilerState());
} catch (ApkProvisionException e) {
Logger.getInstance(AndroidRunConfiguration.class).error(e);
launchStatus.terminateLaunch("Unable to identify application id");
return null;
}
}
use of com.android.tools.idea.run.activity.StartActivityFlagsProvider in project intellij by bazelbuild.
the class BlazeAndroidBinaryMobileInstallRunContext method getApplicationLaunchTask.
@Override
public LaunchTask getApplicationLaunchTask(LaunchOptions launchOptions, @Nullable Integer userId, AndroidDebugger androidDebugger, AndroidDebuggerState androidDebuggerState, ProcessHandlerLaunchStatus processHandlerLaunchStatus) throws ExecutionException {
final StartActivityFlagsProvider startActivityFlagsProvider = new DefaultStartActivityFlagsProvider(androidDebugger, androidDebuggerState, project, launchOptions.isDebug(), UserIdHelper.getFlagsFromUserId(userId));
BlazeAndroidDeployInfo deployInfo;
try {
deployInfo = buildStep.getDeployInfo();
} catch (ApkProvisionException e) {
throw new ExecutionException(e);
}
return BlazeAndroidBinaryApplicationLaunchTaskProvider.getApplicationLaunchTask(project, applicationIdProvider, deployInfo.getMergedManifestFile(), configState, startActivityFlagsProvider, processHandlerLaunchStatus);
}
Aggregations