summaryrefslogtreecommitdiff
path: root/core/java/android/os/VibrationEffect.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2018-06-29 17:15:40 -0600
committerJeff Sharkey <jsharkey@android.com>2018-06-29 17:15:44 -0600
commitc609116a1b9fabc010d4b1985e2241b22cd790ee (patch)
tree62387e8bb92a7316893131ecf1e9ef0fc6723a5a /core/java/android/os/VibrationEffect.java
parentaf5753836912a1c76ac35071b8343a6d00782d9e (diff)
Get android.os tests running against real APIs.
Combination of moving to existing public API, tagging things as @TestApi, and bringing utility methods into tests. Bug: 13282254 Test: atest cts/tests/tests/os/ Change-Id: Ifd24c0d048d200e8595e194890cc1dc53ddc2b3e
Diffstat (limited to 'core/java/android/os/VibrationEffect.java')
-rw-r--r--core/java/android/os/VibrationEffect.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java
index 91c69fb07f77..01d85c6c6c85 100644
--- a/core/java/android/os/VibrationEffect.java
+++ b/core/java/android/os/VibrationEffect.java
@@ -54,6 +54,7 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_CLICK = Effect.CLICK;
/**
@@ -62,6 +63,7 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_DOUBLE_CLICK = Effect.DOUBLE_CLICK;
/**
@@ -69,6 +71,7 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_TICK = Effect.TICK;
/**
@@ -76,6 +79,7 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_THUD = Effect.THUD;
/**
@@ -83,6 +87,7 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_POP = Effect.POP;
/**
@@ -90,8 +95,20 @@ public abstract class VibrationEffect implements Parcelable {
* @see #get(int)
* @hide
*/
+ @TestApi
public static final int EFFECT_HEAVY_CLICK = Effect.HEAVY_CLICK;
+ /** {@hide} */
+ @TestApi
+ public static final int EFFECT_STRENGTH_LIGHT = EffectStrength.LIGHT;
+
+ /** {@hide} */
+ @TestApi
+ public static final int EFFECT_STRENGTH_MEDIUM = EffectStrength.MEDIUM;
+
+ /** {@hide} */
+ @TestApi
+ public static final int EFFECT_STRENGTH_STRONG = EffectStrength.STRONG;
/**
* Ringtone patterns. They may correspond with the device's ringtone audio, or may just be a
@@ -307,6 +324,7 @@ public abstract class VibrationEffect implements Parcelable {
*
* @hide
*/
+ @TestApi
public abstract long getDuration();
/**