use of com.android.server.net.NetworkStatsServiceTest.LatchedHandler in project android_frameworks_base by ResurrectionRemix.
the class NetworkStatsObserversTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
MockitoAnnotations.initMocks(this);
mObserverHandlerThread = new IdleableHandlerThread("HandlerThread");
mObserverHandlerThread.start();
final Looper observerLooper = mObserverHandlerThread.getLooper();
mStatsObservers = new NetworkStatsObservers() {
@Override
protected Looper getHandlerLooperLocked() {
return observerLooper;
}
};
mCv = new ConditionVariable();
mHandler = new LatchedHandler(Looper.getMainLooper(), mCv);
mMessenger = new Messenger(mHandler);
mActiveIfaces = new ArrayMap<>();
mActiveUidIfaces = new ArrayMap<>();
}
use of com.android.server.net.NetworkStatsServiceTest.LatchedHandler in project platform_frameworks_base by android.
the class NetworkStatsObserversTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
MockitoAnnotations.initMocks(this);
mObserverHandlerThread = new IdleableHandlerThread("HandlerThread");
mObserverHandlerThread.start();
final Looper observerLooper = mObserverHandlerThread.getLooper();
mStatsObservers = new NetworkStatsObservers() {
@Override
protected Looper getHandlerLooperLocked() {
return observerLooper;
}
};
mCv = new ConditionVariable();
mHandler = new LatchedHandler(Looper.getMainLooper(), mCv);
mMessenger = new Messenger(mHandler);
mActiveIfaces = new ArrayMap<>();
mActiveUidIfaces = new ArrayMap<>();
}
use of com.android.server.net.NetworkStatsServiceTest.LatchedHandler in project android_frameworks_base by DirtyUnicorns.
the class NetworkStatsObserversTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
MockitoAnnotations.initMocks(this);
mObserverHandlerThread = new IdleableHandlerThread("HandlerThread");
mObserverHandlerThread.start();
final Looper observerLooper = mObserverHandlerThread.getLooper();
mStatsObservers = new NetworkStatsObservers() {
@Override
protected Looper getHandlerLooperLocked() {
return observerLooper;
}
};
mCv = new ConditionVariable();
mHandler = new LatchedHandler(Looper.getMainLooper(), mCv);
mMessenger = new Messenger(mHandler);
mActiveIfaces = new ArrayMap<>();
mActiveUidIfaces = new ArrayMap<>();
}
use of com.android.server.net.NetworkStatsServiceTest.LatchedHandler in project android_frameworks_base by crdroidandroid.
the class NetworkStatsObserversTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
MockitoAnnotations.initMocks(this);
mObserverHandlerThread = new IdleableHandlerThread("HandlerThread");
mObserverHandlerThread.start();
final Looper observerLooper = mObserverHandlerThread.getLooper();
mStatsObservers = new NetworkStatsObservers() {
@Override
protected Looper getHandlerLooperLocked() {
return observerLooper;
}
};
mCv = new ConditionVariable();
mHandler = new LatchedHandler(Looper.getMainLooper(), mCv);
mMessenger = new Messenger(mHandler);
mActiveIfaces = new ArrayMap<>();
mActiveUidIfaces = new ArrayMap<>();
}
Aggregations