Commit b09a5e56 authored by nyquist's avatar nyquist Committed by Commit bot

[android] Proguard out most of guava

This CL removes most of guava, except a few classes and annotations.

Also updates the rest of Chrome to ensure only those classes are in use.

Thirdly, it adds an OWNERS file to third_party/guava.

BUG=163393
TBR=brettw@chromium.org

Review URL: https://codereview.chromium.org/546973003

Cr-Commit-Position: refs/heads/master@{#293828}
parent 78366d79
...@@ -7,8 +7,6 @@ package org.chromium.chrome.browser.sync; ...@@ -7,8 +7,6 @@ package org.chromium.chrome.browser.sync;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;
import com.google.common.base.Joiner;
import org.chromium.base.CalledByNative; import org.chromium.base.CalledByNative;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
...@@ -17,6 +15,7 @@ import org.chromium.sync.internal_api.pub.SyncDecryptionPassphraseType; ...@@ -17,6 +15,7 @@ import org.chromium.sync.internal_api.pub.SyncDecryptionPassphraseType;
import org.chromium.sync.internal_api.pub.base.ModelType; import org.chromium.sync.internal_api.pub.base.ModelType;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.SortedSet; import java.util.SortedSet;
...@@ -533,7 +532,16 @@ public class ProfileSyncService { ...@@ -533,7 +532,16 @@ public class ProfileSyncService {
for (ModelType type : filteredTypes) { for (ModelType type : filteredTypes) {
set.add(type.toString()); set.add(type.toString());
} }
return Joiner.on(", ").join(set); StringBuilder sb = new StringBuilder();
Iterator<String> it = set.iterator();
if (it.hasNext()) {
sb.append(it.next());
while (it.hasNext()) {
sb.append(", ");
sb.append(it.next());
}
}
return sb.toString();
} }
// Native methods // Native methods
......
...@@ -26,7 +26,6 @@ import android.widget.LinearLayout; ...@@ -26,7 +26,6 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.EmptyTabObserver; import org.chromium.chrome.browser.EmptyTabObserver;
...@@ -264,7 +263,7 @@ public class AccessibilityTabModelListItem extends FrameLayout implements OnClic ...@@ -264,7 +263,7 @@ public class AccessibilityTabModelListItem extends FrameLayout implements OnClic
private void updateTabTitle() { private void updateTabTitle() {
String title = mTab != null ? mTab.getTitle() : null; String title = mTab != null ? mTab.getTitle() : null;
if (Strings.isNullOrEmpty(title)) { if (title == null || title.isEmpty()) {
title = getContext().getResources().getString(R.string.tab_loading_default_title); title = getContext().getResources().getString(R.string.tab_loading_default_title);
} }
......
nyquist@chromium.org
yfriedman@chromium.org
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
-keep class com.google.common.base.** { -keep class com.google.common.annotations.VisibleForTesting,
*; com.google.common.base.Preconditions,
} com.google.common.base.Objects,
com.google.common.base.Strings,
-keep class com.google.common.annotations.** { com.google.common.base.Supplier {
*; *;
} }
-keepattributes Signature -keepattributes Signature
......
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