Commit 126551d3 authored by Piotr Bialecki's avatar Piotr Bialecki Committed by Commit Bot

Add InstallActivity to manifest, fix bug in ArCoreJavaUtils

InstallActivity entry needs to be placed in base module's manifest
as we do not refresh application context after successful AR module
installation.

Bug fix for incorrect callback being called on successful AR module
installation.

Bug: 926225
Change-Id: I45c448d89d3b5aa15b81c38ef9ffc60d5a0a6308
Reviewed-on: https://chromium-review.googlesource.com/c/1459797
Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630452}
parent 1f515945
......@@ -698,6 +698,7 @@ android_library("chrome_test_java") {
"//third_party/android_deps:android_support_design_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:android_support_v7_recyclerview_java",
"//third_party/android_deps:com_google_ar_core_java",
"//third_party/android_deps:com_google_protobuf_protobuf_lite_java",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
......
......@@ -179,6 +179,13 @@ by a child template that "extends" this file.
manifest entries. -->
<meta-data android:name="com.google.ar.core.min_apk_version"
android:value="181012000"/>
<activity
android:name="com.google.ar.core.InstallActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:excludeFromRecents="true"
android:exported="false"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Material.Light.Dialog.Alert" />
{% endif %}
<!-- Cast support -->
......
......@@ -23,7 +23,6 @@ import org.chromium.chrome.browser.modules.ModuleInstallUi;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.components.module_installer.ModuleInstaller;
/**
* Provides ARCore classes access to java-related app functionality.
*/
......@@ -153,7 +152,7 @@ public class ArCoreJavaUtils implements ModuleInstallUi.FailureUiListener {
if (mNativeArCoreJavaUtils != 0) {
if (success) {
ui.showInstallSuccessUi();
nativeOnRequestInstallSupportedArCoreResult(mNativeArCoreJavaUtils, success);
nativeOnRequestInstallArModuleResult(mNativeArCoreJavaUtils, success);
} else {
ui.showInstallFailureUi();
// early exit - user will be offered a choice to retry & install flow will
......@@ -167,6 +166,7 @@ public class ArCoreJavaUtils implements ModuleInstallUi.FailureUiListener {
@CalledByNative
private void requestInstallSupportedArCore(final Tab tab) {
assert shouldRequestInstallSupportedArCore();
@ArCoreShim.Availability
int arCoreAvailability = getArCoreInstallStatus();
final Activity activity = tab.getActivity();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment