Move Java of GVR SDK into VR DFM
Move gvr_common_java resource from dependencies for chrome_java android_library to dependencies for VR java android_library. Change gvr_common_java to be a classpath_dep of device/vr java. Copy GVR resources gvr_vr_mode_component and VrActivityTheme into base values.xml. Bug: 862706 Change-Id: I7d04e3ec92bec2f76448900d5b2576d215acd4ea Reviewed-on: https://chromium-review.googlesource.com/c/1479586 Commit-Queue: Anthony Cui <cuianthony@google.com> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org> Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#635392}
This commit is contained in:
@ -100,10 +100,6 @@ android_resources("chrome_app_java_resources") {
|
||||
"//chrome/android/java/res_chromium",
|
||||
]
|
||||
|
||||
if (enable_vr) {
|
||||
resource_dirs += [ "//chrome/android/java/res_vr" ]
|
||||
}
|
||||
|
||||
if (enable_android_night_mode) {
|
||||
resource_dirs += [ "//chrome/android/java/res_night" ]
|
||||
}
|
||||
@ -128,6 +124,16 @@ android_resources("chrome_app_java_resources") {
|
||||
custom_package = "org.chromium.chrome"
|
||||
}
|
||||
|
||||
if (enable_vr) {
|
||||
android_resources("chrome_vr_java_resources") {
|
||||
resource_dirs = [ "//chrome/android/java/res_vr" ]
|
||||
deps = [
|
||||
":chrome_app_java_resources",
|
||||
]
|
||||
custom_package = "org.chromium.chrome.vr.pub"
|
||||
}
|
||||
}
|
||||
|
||||
android_resources("chrome_download_java_resources") {
|
||||
resource_dirs = [ "//chrome/android/java/res_download" ]
|
||||
deps = [
|
||||
@ -409,9 +415,9 @@ android_library("chrome_java") {
|
||||
|
||||
if (enable_vr) {
|
||||
deps += [
|
||||
":chrome_vr_java_resources",
|
||||
"//device/vr:java",
|
||||
"//third_party/gvr-android-keyboard:kb_java",
|
||||
"//third_party/gvr-android-sdk:gvr_common_java",
|
||||
]
|
||||
}
|
||||
srcjar_deps += [ ":chrome_vr_android_java_enums_srcjar" ]
|
||||
|
19
chrome/android/java/res_vr/values-v17/styles.xml
Normal file
19
chrome/android/java/res_vr/values-v17/styles.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Copy of GVR VrActivityTheme, added here because DFMs cannot add
|
||||
manifest flags.
|
||||
VrActivityTheme is only used by VrFirstRunActivity, and since b/63435686 has
|
||||
been fixed we can potentially remove this resource.-->
|
||||
<style name="VrActivityTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowDisablePreview">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
</style>
|
||||
</resources>
|
16
chrome/android/java/res_vr/values/values.xml
Normal file
16
chrome/android/java/res_vr/values/values.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2011 The Chromium Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<resources
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="MissingTranslation">
|
||||
|
||||
<!-- Copy of GVR gvr_vr_mode_component resource, added here because DFMs cannot add
|
||||
manifest flags. -->
|
||||
<string name="gvr_vr_mode_component" translatable="false"
|
||||
description="Google VR component name used for enabling VR mode">
|
||||
com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService</string>
|
||||
</resources>
|
@ -236,7 +236,8 @@ public class ArCoreJavaUtils implements ModuleInstallUi.FailureUiListener {
|
||||
};
|
||||
// TODO(ijamardo, https://crbug.com/838833): Add icon for AR info bar.
|
||||
SimpleConfirmInfoBarBuilder.create(tab, listener, InfoBarIdentifier.AR_CORE_UPGRADE_ANDROID,
|
||||
R.drawable.vr_services, infobarText, buttonText, null, null, true);
|
||||
org.chromium.chrome.vr.pub.R.drawable.vr_services, infobarText, buttonText, null,
|
||||
null, true);
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
|
@ -11,7 +11,7 @@ import org.chromium.chrome.R;
|
||||
/* package */ class SilenceLintErrors {
|
||||
private int[] mRes = new int[] {
|
||||
R.anim.stay_hidden,
|
||||
R.drawable.vr_services,
|
||||
org.chromium.chrome.vr.pub.R.drawable.vr_services,
|
||||
};
|
||||
|
||||
private SilenceLintErrors() {}
|
||||
|
@ -827,7 +827,8 @@ public class VrShellDelegate
|
||||
};
|
||||
|
||||
SimpleConfirmInfoBarBuilder.create(tab, listener,
|
||||
InfoBarIdentifier.VR_FEEDBACK_INFOBAR_ANDROID, R.drawable.vr_services,
|
||||
InfoBarIdentifier.VR_FEEDBACK_INFOBAR_ANDROID,
|
||||
org.chromium.chrome.vr.pub.R.drawable.vr_services,
|
||||
ContextUtils.getApplicationContext().getString(
|
||||
org.chromium.chrome.vr.R.string.vr_shell_feedback_infobar_description),
|
||||
ContextUtils.getApplicationContext().getString(
|
||||
@ -1020,8 +1021,9 @@ public class VrShellDelegate
|
||||
}
|
||||
};
|
||||
SimpleConfirmInfoBarBuilder.create(tab, listener,
|
||||
InfoBarIdentifier.VR_SERVICES_UPGRADE_ANDROID, R.drawable.vr_services, infobarText,
|
||||
buttonText, null, null, true);
|
||||
InfoBarIdentifier.VR_SERVICES_UPGRADE_ANDROID,
|
||||
org.chromium.chrome.vr.pub.R.drawable.vr_services, infobarText, buttonText, null,
|
||||
null, true);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
@ -181,13 +181,13 @@ android_library("java") {
|
||||
"//third_party/android_deps:android_support_annotations_java",
|
||||
"//third_party/android_deps:android_support_v7_appcompat_java",
|
||||
"//third_party/gvr-android-keyboard:kb_java",
|
||||
"//third_party/gvr-android-sdk:gvr_common_java",
|
||||
"//ui/android:ui_full_java",
|
||||
"//ui/android:ui_utils_java",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":vr_java_resources",
|
||||
"//third_party/gvr-android-sdk:gvr_common_java",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -252,8 +252,8 @@ if (enable_gvr_services) {
|
||||
java_files = java_sources_needing_jni
|
||||
deps = [
|
||||
"//base:base_java",
|
||||
"//third_party/gvr-android-sdk:gvr_common_java",
|
||||
"//ui/android:ui_java",
|
||||
]
|
||||
classpath_deps = [ "//third_party/gvr-android-sdk:gvr_common_java" ]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user