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 int DEFAULT_SUBSCRIPTION_ID = SubscriptionManager.INVALID_SUBSCRIPTION_ID; 17 18 @Implementation hasMobileData(Context context)19 protected static boolean hasMobileData(Context context) { 20 return IS_MOBILE_DATA_SUPPORTED; 21 } 22 23 @Implementation hasWifiRadio(Context context)24 protected static boolean hasWifiRadio(Context context) { 25 return IS_WIFI_SUPPORTED; 26 } 27 28 @Implementation getDefaultSubscriptionId(Context context)29 protected static int getDefaultSubscriptionId(Context context) { 30 return DEFAULT_SUBSCRIPTION_ID; 31 } 32 33 @Implementation hasEthernet(Context context)34 protected static boolean hasEthernet(Context context) { return false; } 35 } 36