Messaging: Remove unused code

Change-Id: I8093bb3e305ae323f7069bf42f9e83f8c8647cc7
This commit is contained in:
Michael W
2024-12-26 15:54:37 +01:00
parent 0069df879a
commit e29b158fba
69 changed files with 42 additions and 3228 deletions
@@ -18,8 +18,6 @@ package com.android.messaging.util;
import android.os.Looper;
import java.util.Arrays;
public final class Assert {
public @interface RunsOnMainThread {}
public @interface DoesNotRunOnMainThread {}
@@ -46,17 +44,6 @@ public final class Assert {
setIfEngBuild();
}
/**
* Halt execution if this is not an eng build.
* <p>Intended for use in code paths that should be run only for tests and never on
* a real build.
* <p>Note that this will crash on a user build even though asserts don't normally
* crash on a user build.
*/
public static void isEngBuild() {
isTrueReleaseCheck(sIsEngBuild);
}
/**
* Halt execution if this isn't the case.
*/
@@ -75,15 +62,6 @@ public final class Assert {
}
}
/**
* Halt execution even in release builds if this isn't the case.
*/
public static void isTrueReleaseCheck(final boolean condition) {
if (!condition) {
fail("Expected condition to be true", true);
}
}
public static void equals(final int expected, final int actual) {
if (expected != actual) {
fail("Expected " + expected + " but got " + actual, false);
@@ -103,15 +81,6 @@ public final class Assert {
}
}
public static void oneOf(final int actual, final int ...expected) {
for (int value : expected) {
if (actual == value) {
return;
}
}
fail("Expected value to be one of " + Arrays.toString(expected) + " but was " + actual);
}
public static void inRange(
final int val, final int rangeMinInclusive, final int rangeMaxInclusive) {
if (val < rangeMinInclusive || val > rangeMaxInclusive) {