am b3b1ba8d: Fix unit test failures

* commit 'b3b1ba8d4aa73c3c2945759c6632be6dd6ba7a80':
  Fix unit test failures
main
Ken Wakasa 2014-10-28 10:43:04 +00:00 committed by Android Git Automerger
commit 0253758864
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,8 @@
package com.android.inputmethod.latin.common; package com.android.inputmethod.latin.common;
import com.android.inputmethod.annotations.UsedForTesting;
public final class Constants { public final class Constants {
public static final class Color { public static final class Color {
/** /**
@ -305,11 +307,13 @@ public final class Constants {
public static final int SCREEN_METRICS_LARGE_TABLET = 2; public static final int SCREEN_METRICS_LARGE_TABLET = 2;
public static final int SCREEN_METRICS_SMALL_TABLET = 3; public static final int SCREEN_METRICS_SMALL_TABLET = 3;
@UsedForTesting
public static boolean isPhone(final int screenMetrics) { public static boolean isPhone(final int screenMetrics) {
return screenMetrics == SCREEN_METRICS_SMALL_PHONE return screenMetrics == SCREEN_METRICS_SMALL_PHONE
|| screenMetrics == SCREEN_METRICS_LARGE_PHONE; || screenMetrics == SCREEN_METRICS_LARGE_PHONE;
} }
@UsedForTesting
public static boolean isTablet(final int screenMetrics) { public static boolean isTablet(final int screenMetrics) {
return screenMetrics == SCREEN_METRICS_SMALL_TABLET return screenMetrics == SCREEN_METRICS_SMALL_TABLET
|| screenMetrics == SCREEN_METRICS_LARGE_TABLET; || screenMetrics == SCREEN_METRICS_LARGE_TABLET;