1 package com.android.settings.testutils.shadow;
2 
3 import android.content.Context;
4 import android.telephony.SubscriptionManager;
5 
6 import com.android.settings.datausage.DataUsageUtils;
7 
8 import org.robolectric.annotation.Implementation;
9 import org.robolectric.annotation.Implements;
10 
11 @Implements(DataUsageUtils.class)
12 public class ShadowDataUsageUtils {
13 
14     public static boolean IS_MOBILE_DATA_SUPPORTED = true;
15     public static boolean IS_WIFI_SUPPORTED = true;
16     public static boolean HAS_SIM = true;
17     public static int DEFAULT_SUBSCRIPTION_ID = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
18 
19     @Implementation
hasMobileData(Context context)20     protected static boolean hasMobileData(Context context) {
21         return IS_MOBILE_DATA_SUPPORTED;
22     }
23 
24     @Implementation
hasWifiRadio(Context context)25     protected static boolean hasWifiRadio(Context context) {
26         return IS_WIFI_SUPPORTED;
27     }
28 
29     @Implementation
getDefaultSubscriptionId(Context context)30     protected static int getDefaultSubscriptionId(Context context) {
31         return DEFAULT_SUBSCRIPTION_ID;
32     }
33 
34     @Implementation
hasSim(Context context)35     protected static boolean hasSim(Context context) {
36         return HAS_SIM;
37     }
38 
39     @Implementation
hasEthernet(Context context)40     protected static boolean hasEthernet(Context context) { return false; }
41 }
42