Commit 2b9934d6 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Extract Settings resource deps to separate target

Extract the Android resource-specific dependencies to a separate build
target. Eventually, this target will include its own module's resource
files too.

Bug: 1035928
Change-Id: Ib63ff15ae817bfb782f49350881a706b3e161515
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1988851Reviewed-by: default avatarBrandon Wylie <wylieb@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728734}
parent 89545425
......@@ -9,11 +9,23 @@ android_library("java") {
"android/java/src/org/chromium/chrome/browser/settings/SettingsUtils.java",
]
deps = [
":java_resources",
"//base:base_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:com_android_support_design_java",
"//third_party/android_deps:com_android_support_preference_v7_java",
# TODO(crbug.com/1017190): Remove these 2 deps once we stop linting individual targets.
"//third_party/android_deps:com_android_support_design_java",
"//ui/android:ui_java",
]
}
android_resources("java_resources") {
deps = [
"//third_party/android_deps:com_android_support_design_java",
"//ui/android:ui_java_resources",
]
resource_dirs = []
custom_package = "org.chromium.chrome.browser.settings"
}
......@@ -22,7 +22,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.XmlRes;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.ui.R;
/**
* A helper class for Settings.
*/
......@@ -85,8 +85,7 @@ public class SettingsUtils {
*/
public static boolean setOverflowMenuVisibility(@Nullable Activity activity, int visibility) {
if (activity == null) return false;
// TODO(chouinard): Remove R qualification once this package has its own android_resources.
ViewGroup actionBar = activity.findViewById(android.support.design.R.id.action_bar);
ViewGroup actionBar = activity.findViewById(R.id.action_bar);
int i = actionBar.getChildCount();
ActionMenuView menuView = null;
while (i-- > 0) {
......
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