summaryrefslogtreecommitdiff
path: root/apct-tests
diff options
context:
space:
mode:
authorMarcin Oczeretko <marcinoc@google.com>2018-08-30 20:15:52 +0100
committerMarcin Oczeretko <marcinoc@google.com>2018-09-06 10:54:55 +0100
commitc80c81a516930a61a516291f0ac1d6c9da2854fa (patch)
tree55d9034c780e00932b5b40edd61e7f6e1142b143 /apct-tests
parent3680ae6276850d8750170b6364bd5162ecebff2e (diff)
Extract CachedDeviceState from BinderCallsStats
Add a service that tracks the device state properties which are interesting to System Server telemetry services. Allows the services to share this code and have consistent state information. Test: Unit tests and manually tested Change-Id: Ia5c78c45a55414a0c5c46202db2a37283b50a703
Diffstat (limited to 'apct-tests')
-rw-r--r--apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
index 66a2600d946a..d8d4a6efb6e8 100644
--- a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
@@ -23,8 +23,7 @@ import android.support.test.runner.AndroidJUnit4;
import com.android.internal.os.BinderCallsStats;
import com.android.internal.os.BinderInternal.CallSession;
-
-import java.util.Random;
+import com.android.internal.os.CachedDeviceState;
import org.junit.After;
import org.junit.Before;
@@ -32,8 +31,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertNull;
-
/**
* Performance tests for {@link BinderCallsStats}
@@ -49,6 +46,8 @@ public class BinderCallsStatsPerfTest {
@Before
public void setUp() {
mBinderCallsStats = new BinderCallsStats(new BinderCallsStats.Injector());
+ CachedDeviceState deviceState = new CachedDeviceState(false, false);
+ mBinderCallsStats.setDeviceState(deviceState.getReadonlyClient());
}
@After