1 // Copyright 2017 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.net; 6 7 import android.os.Looper; 8 9 import org.jni_zero.CalledByNative; 10 11 /** Utility functions for testing features implemented in ProxyConfigServiceAndroid. */ 12 public class AndroidProxyConfigServiceTestUtil { 13 /** Helper for tests that prepares the Looper on the current thread. */ 14 @CalledByNative prepareLooper()15 private static void prepareLooper() { 16 if (Looper.myLooper() == null) { 17 Looper.prepare(); 18 } 19 } 20 } 21