Remove unreferenced code from feed/common

PiperOrigin-RevId: 284991370
Change-Id: I53628c6cfb122e6a05c17bd8732dbbfeb7082104
diff --git a/src/main/java/com/google/android/libraries/feed/common/Result.java b/src/main/java/com/google/android/libraries/feed/common/Result.java
deleted file mode 100644
index cc11382..0000000
--- a/src/main/java/com/google/android/libraries/feed/common/Result.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common;
-
-
-/** Wrapper that allows callbacks to return a value as well as whether the call was successful. */
-public class Result<T> {
-
-  /*@Nullable*/ private final T value;
-  private final boolean isSuccessful;
-
-  private Result(/*@Nullable*/ T value, boolean isSuccessful) {
-    this.value = value;
-    this.isSuccessful = isSuccessful;
-  }
-
-  public static <T> Result<T> success(T value) {
-    return new Result<>(value, /* isSuccessful= */ true);
-  }
-
-  public static <T> Result<T> failure() {
-    return new Result<>(null, false);
-  }
-
-  /** Retrieves the value for the result. */
-  public T getValue() {
-    if (!isSuccessful) {
-      throw new IllegalStateException("Cannot retrieve value for failed result");
-    }
-    return Validators.checkNotNull(value);
-  }
-
-  // TODO: replace isSuccessful with failed()
-  public boolean isSuccessful() {
-    return isSuccessful;
-  }
-}
diff --git a/src/main/java/com/google/android/libraries/feed/common/logging/BUILD b/src/main/java/com/google/android/libraries/feed/common/logging/BUILD
index b2021a9..ac7dde4 100644
--- a/src/main/java/com/google/android/libraries/feed/common/logging/BUILD
+++ b/src/main/java/com/google/android/libraries/feed/common/logging/BUILD
@@ -5,8 +5,5 @@
 android_library(
     name = "logging",
     srcs = glob(["*.java"]),
-    deps = [
-        "@com_google_code_findbugs_jsr305//jar",
-        "@maven//:com_android_support_support_annotations",
-    ],
+    deps = ["@com_google_code_findbugs_jsr305//jar"],
 )
diff --git a/src/main/java/com/google/android/libraries/feed/common/logging/Dumpable.java b/src/main/java/com/google/android/libraries/feed/common/logging/Dumpable.java
deleted file mode 100644
index 66b6de0..0000000
--- a/src/main/java/com/google/android/libraries/feed/common/logging/Dumpable.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common.logging;
-
-/** Interface for objects that know how to dump details of their state to a {@link Dumper}. */
-public interface Dumpable {
-  /** Called to dump an object into a {@link Dumper}. */
-  void dump(Dumper dumper);
-}
diff --git a/src/main/java/com/google/android/libraries/feed/common/logging/Dumper.java b/src/main/java/com/google/android/libraries/feed/common/logging/Dumper.java
deleted file mode 100644
index 85f7e2c..0000000
--- a/src/main/java/com/google/android/libraries/feed/common/logging/Dumper.java
+++ /dev/null
@@ -1,265 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common.logging;
-
-import android.support.annotation.VisibleForTesting;
-import android.text.TextUtils;
-import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-/**
- * Simple Dumper modelled after the AGSA Dumper. This will dump a tree of objects which implement
- * the {@link Dumpable} interface.
- */
-public final class Dumper {
-  private static final String TAG = "Dumper";
-  private static final String SINGLE_INDENT = "  ";
-
-  private final int indentLevel;
-
-  // Walk up the chain of parents to
-  // ensure none are currently dumping a given dumpable, to prevent cycles. The WeakReference
-  // itself is always non-null, but the Dumpable may be null.
-  private final WeakReference<Dumpable> currentDumpable;
-  /*@Nullable*/ private final Dumper parent;
-  private final boolean redacted;
-
-  // The root Dumper will create the values used by all children Dumper instances.  This flattens
-  // the output into one list.
-  @VisibleForTesting final List<DumperValue> values;
-
-  /** Returns the default Dumper, this will show sensitive content. */
-  public static Dumper newDefaultDumper() {
-    return new Dumper(1, null, new WeakReference<>(null), new ArrayList<>(), false);
-  }
-
-  /** Returns a Dumper which will redact sensitive content. */
-  public static Dumper newRedactedDumper() {
-    return new Dumper(1, null, new WeakReference<>(null), new ArrayList<>(), true);
-  }
-
-  // Private constructor, these are created through the static newDefaultDumper} method.
-  private Dumper(
-      int indentLevel,
-      /*@Nullable*/ Dumper parent,
-      WeakReference<Dumpable> currentDumpable,
-      List<DumperValue> values,
-      boolean redacted) {
-    this.indentLevel = indentLevel;
-    this.parent = parent;
-    this.currentDumpable = currentDumpable;
-    this.values = values;
-    this.redacted = redacted;
-  }
-
-  private boolean isDescendentOf(Dumpable dumpable) {
-    return (currentDumpable.get() == dumpable)
-        || (parent != null && parent.isDescendentOf(dumpable));
-  }
-
-  /** Creates a new Dumper with a indent level one greater than the current indent level. */
-  public Dumper getChildDumper() {
-    return getChildDumper(null);
-  }
-
-  private Dumper getChildDumper(/*@Nullable*/ Dumpable dumpable) {
-    return new Dumper(indentLevel + 1, this, new WeakReference<>(dumpable), values, redacted);
-  }
-
-  /** Set the title of the section. This is output at the previous indent level. */
-  public void title(String title) {
-    values.add(new DumperValue(indentLevel - 1, title));
-  }
-
-  /** Adds a String as an indented line to the dump */
-  public void format(String format, Object... args) {
-    addLine("", String.format(Locale.US, format, args));
-  }
-
-  /** Create a Dumper value with the specified name. */
-  public DumperValue forKey(String name) {
-    return addLine(indentLevel, name);
-  }
-
-  /** Allow the indent level to be adjusted. */
-  public DumperValue forKey(String name, int indentAdjustment) {
-    return addLine(indentLevel + indentAdjustment, name);
-  }
-
-  /** Dump a Dumpable as a child of the current Dumper */
-  public void dump(/*@Nullable*/ Dumpable dumpable) {
-    if (dumpable == null) {
-      return;
-    }
-    if (isDescendentOf(dumpable)) {
-      format("[cycle detected]");
-      return;
-    }
-    Dumper child = getChildDumper(dumpable);
-    try {
-      dumpable.dump(child);
-    } catch (Exception e) {
-      Logger.e(TAG, e, "Dump Failed");
-    }
-  }
-
-  /** Write the Dumpable to an {@link Appendable}. */
-  public void write(Appendable writer) throws IOException {
-    boolean newLine = true;
-    for (DumperValue value : values) {
-      String stringValue = value.toString(redacted);
-      if (!newLine) {
-        if (value.compactPrevious) {
-          writer.append(" | ");
-        } else {
-          String indent = getIndent(value.indentLevel);
-          writer.append("\n").append(indent);
-        }
-      }
-      writer.append(stringValue);
-      newLine = false;
-    }
-    writer.append("\n");
-  }
-
-  private DumperValue addLine(int indentLevel, String title) {
-    DumperValue dumperValue = new DumperValue(indentLevel, title);
-    values.add(dumperValue);
-    return dumperValue;
-  }
-
-  private DumperValue addLine(String name, String value) {
-    return forKey(name).value(value);
-  }
-
-  /**
-   * Class which represents a name value pair within the dump. It is used for both titles and for
-   * the name value pair content within the dump. The indent level is used to specify the indent
-   * level for content appearing on a new line. Multiple DumperValues may be compacted into a single
-   * line in the output.
-   */
-  public static final class DumperValue {
-    @VisibleForTesting static final String REDACTED = "[REDACTED]";
-    @VisibleForTesting final String name;
-    @VisibleForTesting final StringBuilder content;
-    @VisibleForTesting final int indentLevel;
-    private boolean compactPrevious = false;
-    private boolean sensitive = false;
-
-    // create a DumpValue with just a name, this is not public, it will is called by Dumper
-    DumperValue(int indentLevel, String name) {
-      this.indentLevel = indentLevel;
-      this.name = name;
-      this.content = new StringBuilder();
-    }
-
-    /** Append an int to the current content of this value */
-    public DumperValue value(int value) {
-      this.content.append(value);
-      return this;
-    }
-
-    /** Append an String to the current content of this value */
-    public DumperValue value(String value) {
-      this.content.append(value);
-      return this;
-    }
-
-    /** Append an boolean to the current content of this value */
-    public DumperValue value(boolean value) {
-      this.content.append(value);
-      return this;
-    }
-
-    /** Add a Date value. It will be formatted as Logcat Dates are formatted */
-    public DumperValue value(Date value) {
-      this.content.append(StringFormattingUtils.formatLogDate(value));
-      return this;
-    }
-
-    /** Add a value specified as an object. */
-    public DumperValue valueObject(Object value) {
-      if (value instanceof Integer) {
-        return value((Integer) value);
-      }
-      if (value instanceof Boolean) {
-        return value((Boolean) value);
-      }
-      return value(value.toString());
-    }
-
-    /**
-     * When output, this DumperValue will be compacted to the same output line as the previous
-     * value.
-     */
-    public DumperValue compactPrevious() {
-      compactPrevious = true;
-      return this;
-    }
-
-    /** Mark the Value as containing sensitive data */
-    public DumperValue sensitive() {
-      sensitive = true;
-      return this;
-    }
-
-    /**
-     * Output the value as a Name/Value pair. This will convert sensitive data to "REDACTED" if we
-     * are not dumping sensitive data.
-     */
-    String toString(boolean suppressSensitive) {
-      String value = "";
-      if (!TextUtils.isEmpty(content)) {
-        value = (suppressSensitive && sensitive) ? REDACTED : content.toString();
-      }
-      if (!TextUtils.isEmpty(name) && !TextUtils.isEmpty(value)) {
-        return name + ": " + value;
-      } else if (!TextUtils.isEmpty(name)) {
-        return name + ":";
-      } else if (!TextUtils.isEmpty(value)) {
-        return value;
-      } else {
-        return "";
-      }
-    }
-  }
-
-  private static final String[] INDENTATIONS =
-      new String[] {
-        "", createIndent(1), createIndent(2), createIndent(3), createIndent(4), createIndent(5),
-      };
-
-  private static String createIndent(int size) {
-    StringBuilder sb = new StringBuilder();
-    for (int i = 0; i < size; i++) {
-      sb.append(SINGLE_INDENT);
-    }
-    return sb.toString();
-  }
-
-  private static String getIndent(int indentLevel) {
-    if (indentLevel < 0) {
-      return INDENTATIONS[0];
-    } else if (indentLevel < INDENTATIONS.length) {
-      return INDENTATIONS[indentLevel];
-    } else {
-      return createIndent(indentLevel);
-    }
-  }
-}
diff --git a/src/main/java/com/google/android/libraries/feed/common/logging/StringFormattingUtils.java b/src/main/java/com/google/android/libraries/feed/common/logging/StringFormattingUtils.java
deleted file mode 100644
index 61d4e54..0000000
--- a/src/main/java/com/google/android/libraries/feed/common/logging/StringFormattingUtils.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common.logging;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-/** Date-formatting static methods. */
-public final class StringFormattingUtils {
-
-  // Do not instantiate
-  private StringFormattingUtils() {}
-
-  private static SimpleDateFormat logDateFormat;
-
-  /** Formats {@code date} in the same format as used by logcat. */
-  static synchronized String formatLogDate(Date date) {
-    if (logDateFormat == null) {
-      // Getting the date format is mildly expensive, so don't do it unless we need it.
-      logDateFormat = new SimpleDateFormat("MM-dd HH:mm:ss.SSS", Locale.US);
-    }
-    return logDateFormat.format(date);
-  }
-
-  /** Formats a long as a Date */
-  public static String formatLogDate(long timeMs) {
-    return formatLogDate(new Date(timeMs));
-  }
-}
diff --git a/src/main/java/com/google/android/libraries/feed/common/time/BUILD b/src/main/java/com/google/android/libraries/feed/common/time/BUILD
index 58b8719..1d33ded 100644
--- a/src/main/java/com/google/android/libraries/feed/common/time/BUILD
+++ b/src/main/java/com/google/android/libraries/feed/common/time/BUILD
@@ -5,9 +5,4 @@
 android_library(
     name = "time",
     srcs = glob(["*.java"]),
-    deps = [
-        "//src/main/java/com/google/android/libraries/feed/api/internal/common",
-        "//src/main/java/com/google/android/libraries/feed/common/logging",
-        "@com_google_code_findbugs_jsr305//jar",
-    ],
 )
diff --git a/src/main/java/com/google/android/libraries/feed/common/time/TimingUtils.java b/src/main/java/com/google/android/libraries/feed/common/time/TimingUtils.java
deleted file mode 100644
index 5d2b59b..0000000
--- a/src/main/java/com/google/android/libraries/feed/common/time/TimingUtils.java
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common.time;
-
-import android.text.TextUtils;
-import android.util.LongSparseArray;
-import com.google.android.libraries.feed.api.internal.common.ThreadUtils;
-import com.google.android.libraries.feed.common.logging.Dumpable;
-import com.google.android.libraries.feed.common.logging.Dumper;
-import com.google.android.libraries.feed.common.logging.Logger;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Queue;
-import java.util.Stack;
-import javax.annotation.concurrent.GuardedBy;
-
-/**
- * Utility class providing timing related utilities. The primary feature is to created {@link
- * ElapsedTimeTracker} instances, which are used to track elapsed time for tasks. The timing
- * information is output to the state dump.
- */
-public class TimingUtils implements Dumpable {
-  private static final String TAG = "TimingUtils";
-  private static final String BACKGROUND_THREAD = "background-";
-  private static final String UI_THREAD = "ui";
-  private static final int MAX_TO_DUMP = 10;
-
-  private static int bgThreadId = 1;
-
-  private final ThreadUtils threadUtils = new ThreadUtils();
-  private final Object lock = new Object();
-
-  @GuardedBy("lock")
-  private final Queue<ThreadState> threadDumps = new ArrayDeque<>(MAX_TO_DUMP);
-
-  @GuardedBy("lock")
-  private final LongSparseArray<ThreadStack> threadStacks = new LongSparseArray<>();
-
-  /**
-   * ElapsedTimeTracker works similar to Stopwatch. This is used to track elapsed time for some
-   * task. The start time is tracked when the instance is created. {@code stop} is used to capture
-   * the end time and other statistics about the task. The ElapsedTimeTrackers dumped through the
-   * Dumper. A stack is maintained to log sub-tasks with proper indentation in the Dumper.
-   *
-   * <p>The class will dump only the {@code MAX_TO_DUMP} most recent dumps, discarding older dumps
-   * when new dumps are created.
-   *
-   * <p>ElapsedTimeTracker is designed as a one use class, {@code IllegalStateException}s are thrown
-   * if the class isn't used correctly.
-   */
-  public static class ElapsedTimeTracker {
-    private final ThreadStack threadStack;
-    private final String source;
-
-    private final long startTime;
-    private long endTime = 0;
-
-    private ElapsedTimeTracker(ThreadStack threadStack, String source) {
-      this.threadStack = threadStack;
-      this.source = source;
-      startTime = System.nanoTime();
-    }
-
-    /**
-     * Capture the end time for the elapsed time. {@code IllegalStateException} is thrown if stop is
-     * called more than once. Arguments are treated as pairs within the Dumper output.
-     *
-     * <p>For example: dumper.forKey(arg[0]).value(arg[1])
-     */
-    public void stop(Object... args) {
-      if (endTime > 0) {
-        throw new IllegalStateException("ElapsedTimeTracker has already been stopped.");
-      }
-      endTime = System.nanoTime();
-      TrackerState trackerState =
-          new TrackerState(endTime - startTime, source, args, threadStack.stack.size());
-      threadStack.addTrackerState(trackerState);
-      threadStack.popElapsedTimeTracker(this);
-    }
-  }
-
-  /**
-   * Return a new {@link ElapsedTimeTracker} which is added to the Thread scoped stack. When we dump
-   * the tracker, we will indent the source to indicate sub-tasks within a larger task.
-   */
-  public ElapsedTimeTracker getElapsedTimeTracker(String source) {
-    long threadId = Thread.currentThread().getId();
-    synchronized (lock) {
-      ThreadStack timerStack = threadStacks.get(threadId);
-      if (timerStack == null) {
-        timerStack =
-            new ThreadStack(
-                threadUtils.isMainThread() ? UI_THREAD : BACKGROUND_THREAD + bgThreadId++, false);
-        threadStacks.put(threadId, timerStack);
-      }
-      ElapsedTimeTracker timeTracker = new ElapsedTimeTracker(timerStack, source);
-      timerStack.stack.push(timeTracker);
-      return timeTracker;
-    }
-  }
-
-  /**
-   * This is called to pin the stack structure for a thread. This should only be done for threads
-   * which are long lived. Non-pinned thread will have their stack structures clean up when the
-   * stack is empty.
-   */
-  public void pinThread(Thread thread, String name) {
-    ThreadStack timerStack = new ThreadStack(name, true);
-    synchronized (lock) {
-      threadStacks.put(thread.getId(), timerStack);
-    }
-  }
-
-  @Override
-  public void dump(Dumper dumper) {
-    dumper.title(TAG);
-    synchronized (lock) {
-      for (ThreadState threadState : threadDumps) {
-        dumpThreadState(dumper, threadState);
-      }
-    }
-  }
-
-  private void dumpThreadState(Dumper dumper, ThreadState threadState) {
-    if (threadState.trackerStates.isEmpty()) {
-      Logger.w(TAG, "Found Empty TrackerState List");
-      return;
-    }
-    dumper.forKey("thread").value(threadState.threadName);
-    dumper.forKey("timeStamp").value(threadState.date).compactPrevious();
-    for (int i = threadState.trackerStates.size() - 1; i >= 0; i--) {
-      TrackerState trackerState = threadState.trackerStates.get(i);
-      Dumper child = dumper.getChildDumper();
-      child.forKey("time", trackerState.indent - 1).value(trackerState.duration / 1000000 + "ms");
-      child.forKey("source").value(trackerState.source).compactPrevious();
-      if (trackerState.args != null && trackerState.args.length > 0) {
-        for (int j = 0; j < trackerState.args.length; j++) {
-          String key = trackerState.args[j++].toString();
-          Object value = (j < trackerState.args.length) ? trackerState.args[j] : "";
-          child.forKey(key, trackerState.indent - 1).valueObject(value).compactPrevious();
-        }
-      }
-    }
-  }
-
-  /** Definition of a Stack of {@link ElapsedTimeTracker} instances. */
-  private class ThreadStack {
-    final String name;
-    final Stack<ElapsedTimeTracker> stack = new Stack<>();
-    private List<TrackerState> trackerStates = new ArrayList<>();
-    final boolean pin;
-
-    ThreadStack(String name, boolean pin) {
-      this.name = name;
-      this.pin = pin;
-    }
-
-    void addTrackerState(TrackerState trackerState) {
-      trackerStates.add(trackerState);
-    }
-
-    void popElapsedTimeTracker(ElapsedTimeTracker tracker) {
-      ElapsedTimeTracker top = stack.peek();
-      if (top != tracker) {
-        int pos = stack.search(tracker);
-        if (pos == -1) {
-          Logger.w(TAG, "Trying to Pop non-top of stack timer, ignoring");
-          return;
-        } else {
-          int c = 0;
-          while (stack.peek() != tracker) {
-            c++;
-            stack.pop();
-          }
-          Logger.w(TAG, "Pop TimingTracker which was not the current top, popped % items", c);
-        }
-      }
-      stack.pop();
-      if (stack.isEmpty()) {
-        StringBuilder sb = new StringBuilder();
-        TrackerState ts = trackerStates.get(trackerStates.size() - 1);
-        for (int i = 0; i < ts.args.length; i++) {
-          String key = ts.args[i++].toString();
-          Object value = (i < ts.args.length) ? ts.args[i] : "";
-          if (!TextUtils.isEmpty(key)) {
-            sb.append(key).append(" : ").append(value);
-          } else {
-            sb.append(value);
-          }
-          if ((i + 1) < ts.args.length) {
-            sb.append(" | ");
-          }
-        }
-        Logger.i(
-            TAG,
-            "Task Timing %3sms, thread %s | %s",
-            ((tracker.endTime - tracker.startTime) / 1000000),
-            tracker.threadStack.name,
-            sb);
-        synchronized (lock) {
-          if (threadDumps.size() == MAX_TO_DUMP) {
-            // Before adding a new tracker state, remove the oldest one.
-            threadDumps.remove();
-          }
-          threadDumps.add(new ThreadState(trackerStates, name));
-          trackerStates = new ArrayList<>();
-          if (!pin) {
-            threadStacks.remove(Thread.currentThread().getId());
-          }
-        }
-      }
-    }
-  }
-
-  /** State associated with a thread */
-  private static class ThreadState {
-    final List<TrackerState> trackerStates;
-    final String threadName;
-    final Date date;
-
-    ThreadState(List<TrackerState> trackerStates, String threadName) {
-      this.trackerStates = trackerStates;
-      this.threadName = threadName;
-      date = new Date();
-    }
-  }
-
-  /** State associated with a completed ElapsedTimeTracker */
-  private static class TrackerState {
-    final long duration;
-    final String source;
-    final Object[] args;
-    final int indent;
-
-    TrackerState(long duration, String source, Object[] args, int indent) {
-      this.duration = duration;
-      this.source = source;
-      this.args = args;
-      this.indent = indent;
-    }
-  }
-}
diff --git a/src/test/java/com/google/android/libraries/feed/common/BUILD b/src/test/java/com/google/android/libraries/feed/common/BUILD
index 4b345e2..36c017c 100644
--- a/src/test/java/com/google/android/libraries/feed/common/BUILD
+++ b/src/test/java/com/google/android/libraries/feed/common/BUILD
@@ -17,19 +17,3 @@
         "@robolectric//bazel:android-all",
     ],
 )
-
-android_local_test(
-    name = "ResultTest",
-    size = "small",
-    timeout = "moderate",
-    srcs = ["ResultTest.java"],
-    manifest_values = DEFAULT_ANDROID_LOCAL_TEST_MANIFEST,
-    deps = [
-        "//src/main/java/com/google/android/libraries/feed/common",
-        "//src/main/java/com/google/android/libraries/feed/common/testing",
-        "//third_party:robolectric",
-        "@com_google_protobuf_javalite//:protobuf_java_lite",
-        "@maven//:com_google_truth_truth",
-        "@robolectric//bazel:android-all",
-    ],
-)
diff --git a/src/test/java/com/google/android/libraries/feed/common/ResultTest.java b/src/test/java/com/google/android/libraries/feed/common/ResultTest.java
deleted file mode 100644
index 2c67342..0000000
--- a/src/test/java/com/google/android/libraries/feed/common/ResultTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common;
-
-import static com.google.android.libraries.feed.common.testing.RunnableSubject.assertThatRunnable;
-import static com.google.common.truth.Truth.assertThat;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
-
-/** Test class for {@link Result} */
-@RunWith(RobolectricTestRunner.class)
-public class ResultTest {
-
-  private static final String HELLO_WORLD = "Hello World";
-
-  @Test
-  public void success() throws Exception {
-    Result<String> result = Result.success(HELLO_WORLD);
-    assertThat(result.isSuccessful()).isTrue();
-    assertThat(result.getValue()).isEqualTo(HELLO_WORLD);
-  }
-
-  @Test
-  public void success_nullValue() throws Exception {
-    Result<String> result = Result.success(null);
-    assertThat(result.isSuccessful()).isTrue();
-    assertThatRunnable(result::getValue).throwsAnExceptionOfType(NullPointerException.class);
-  }
-
-  @Test
-  public void error() throws Exception {
-    Result<String> result = Result.failure();
-    assertThat(result.isSuccessful()).isFalse();
-    assertThatRunnable(result::getValue).throwsAnExceptionOfType(IllegalStateException.class);
-  }
-}
diff --git a/src/test/java/com/google/android/libraries/feed/common/logging/BUILD b/src/test/java/com/google/android/libraries/feed/common/logging/BUILD
index 430dd18..2f90f82 100644
--- a/src/test/java/com/google/android/libraries/feed/common/logging/BUILD
+++ b/src/test/java/com/google/android/libraries/feed/common/logging/BUILD
@@ -3,22 +3,6 @@
 licenses(["notice"])  # Apache 2
 
 android_local_test(
-    name = "DumperTest",
-    size = "small",
-    timeout = "moderate",
-    srcs = ["DumperTest.java"],
-    manifest_values = DEFAULT_ANDROID_LOCAL_TEST_MANIFEST,
-    deps = [
-        "//src/main/java/com/google/android/libraries/feed/common/logging",
-        "//third_party:robolectric",
-        "@com_google_code_findbugs_jsr305//jar",
-        "@com_google_protobuf_javalite//:protobuf_java_lite",
-        "@maven//:com_google_truth_truth",
-        "@robolectric//bazel:android-all",
-    ],
-)
-
-android_local_test(
     name = "LoggerTest",
     size = "small",
     timeout = "moderate",
diff --git a/src/test/java/com/google/android/libraries/feed/common/logging/DumperTest.java b/src/test/java/com/google/android/libraries/feed/common/logging/DumperTest.java
deleted file mode 100644
index d2b6254..0000000
--- a/src/test/java/com/google/android/libraries/feed/common/logging/DumperTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2018 The Feed Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.android.libraries.feed.common.logging;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import com.google.android.libraries.feed.common.logging.Dumper.DumperValue;
-import java.io.StringWriter;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
-
-/** Tests of the {@link Dumper}. */
-@RunWith(RobolectricTestRunner.class)
-public class DumperTest {
-  private static final String KEY1 = "keyOne";
-  private static final String KEY2 = "keyTwo";
-  private static final String KEY3 = "keyThree";
-  private static final String VALUE1 = "valueOne";
-  private static final String VALUE2 = "valueTwo";
-
-  @Test
-  public void testBaseDumper() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    dumper.forKey(KEY1).value(13);
-    assertThat(dumper.values).hasSize(1);
-    DumperValue dumperValue = dumper.values.get(0);
-    assertThat(dumperValue).isNotNull();
-    assertThat(dumperValue.name).isEqualTo(KEY1);
-    assertThat(dumperValue.content.toString()).isEqualTo(Integer.toString(13));
-    assertThat(dumperValue.indentLevel).isEqualTo(1);
-  }
-
-  @Test
-  public void testBaseDumper_childDumper() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    dumper.forKey(KEY1).value(13);
-    assertThat(dumper.values).hasSize(1);
-
-    Dumper childDumper = dumper.getChildDumper();
-    childDumper.forKey(KEY2).value(17);
-
-    assertThat(childDumper.values).isEqualTo(dumper.values);
-    assertThat(childDumper.values).hasSize(2);
-
-    DumperValue dumperValue = dumper.values.get(1);
-    assertThat(dumperValue).isNotNull();
-    assertThat(dumperValue.name).isEqualTo(KEY2);
-    assertThat(dumperValue.content.toString()).isEqualTo(Integer.toString(17));
-    assertThat(dumperValue.indentLevel).isEqualTo(2);
-  }
-
-  @Test
-  public void testDumpable() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    TestDumpable testDumpable = new TestDumpable(KEY1);
-    dumper.dump(testDumpable);
-    testDumpable.assertValue(dumper.values.get(0));
-  }
-
-  @Test
-  public void testDumpable_nested() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    TestDumpable dumpableChild = new TestDumpable(KEY1);
-    TestDumpable dumpable = new TestDumpable(dumpableChild, KEY2);
-    dumper.dump(dumpable);
-
-    assertThat(dumper.values).hasSize(2);
-    dumpable.assertValue(dumper.values.get(0));
-    dumpableChild.assertValue(dumper.values.get(1));
-  }
-
-  @Test
-  public void testDumpable_cycle() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    TestDumpable dumpableChild = new TestDumpable(KEY1);
-    TestDumpable dumpable = new TestDumpable(dumpableChild, KEY2);
-    dumpableChild.setDumpable(dumpable);
-
-    dumper.dump(dumpable);
-
-    // Two dumpables + the a message that statesa cycle was detected
-    assertThat(dumper.values).hasSize(3);
-    dumpable.assertValue(dumper.values.get(0));
-    dumpableChild.assertValue(dumper.values.get(1));
-  }
-
-  @Test
-  public void testDumpable_threeChildCycle() {
-    Dumper dumper = Dumper.newDefaultDumper();
-    TestDumpable dumpableThree = new TestDumpable(KEY1);
-    TestDumpable dumpableTwo = new TestDumpable(dumpableThree, KEY2);
-    TestDumpable dumpableOne = new TestDumpable(dumpableTwo, KEY3);
-    dumpableThree.setDumpable(dumpableOne);
-
-    dumper.dump(dumpableOne);
-
-    // 3 dumpables + the a message that states cycle was detected
-    assertThat(dumper.values).hasSize(4);
-  }
-
-  @Test
-  public void testWrite() throws Exception {
-    Dumper dumper = Dumper.newDefaultDumper();
-    TestDumpable testDumpable = new TestDumpable(KEY1);
-    dumper.dump(testDumpable);
-    StringWriter stringWriter = new StringWriter();
-    dumper.write(stringWriter);
-    String dump = stringWriter.toString();
-    assertThat(dump).contains(KEY1);
-    assertThat(dump).contains("13");
-  }
-
-  @Test
-  public void testWrite_compact() throws Exception {
-    Dumper dumper = Dumper.newDefaultDumper();
-    dumper.forKey(KEY1).value(VALUE1);
-    dumper.forKey(KEY2).value(VALUE2).compactPrevious();
-    StringWriter stringWriter = new StringWriter();
-    dumper.write(stringWriter);
-    String dump = stringWriter.toString();
-    assertThat(dump).contains(" | ");
-    assertThat(dump).contains(VALUE1);
-    assertThat(dump).contains(VALUE2);
-  }
-
-  @Test
-  public void testRedacted() throws Exception {
-    Dumper dumper = Dumper.newRedactedDumper();
-    dumper.forKey(KEY1).value(VALUE1).sensitive();
-    dumper.forKey(KEY2).value(VALUE2).compactPrevious();
-    StringWriter stringWriter = new StringWriter();
-    dumper.write(stringWriter);
-    String dump = stringWriter.toString();
-    assertThat(dump).contains(" | ");
-    assertThat(dump).contains(DumperValue.REDACTED);
-    assertThat(dump).doesNotContain(VALUE1);
-    assertThat(dump).contains(VALUE2);
-  }
-
-
-  private static class TestDumpable implements Dumpable {
-
-    /*@Nullable*/ private Dumpable child;
-    private final String key;
-
-    TestDumpable(String key) {
-      this(null, key);
-    }
-
-    TestDumpable(/*@Nullable*/ Dumpable child, String key) {
-      this.child = child;
-      this.key = key;
-    }
-
-    void setDumpable(Dumpable child) {
-      this.child = child;
-    }
-
-    @Override
-    public void dump(Dumper dumper) {
-      dumper.forKey(key).value(13);
-      dumper.dump(child);
-    }
-
-    void assertValue(DumperValue value) {
-      assertThat(value.name).isEqualTo(key);
-      assertThat(value.content.toString()).isEqualTo(Integer.toString(13));
-    }
-  }
-}