/** * 返回 {@link CarrierConfigManager} */ public static CarrierConfigManager getCarrierConfigManager() { return (CarrierConfigManager) get(CARRIER_CONFIG_SERVICE); }
@TargetApi(23) public static CarrierConfigManager getCarrierConfigManager() { return (CarrierConfigManager) getSystemService(Context.CARRIER_CONFIG_SERVICE); }
/** * @since 4.0.0 */ public static CarrierConfigManager carrierConfig(Context context) { return (CarrierConfigManager) context.getSystemService(CARRIER_CONFIG_SERVICE); }
@TargetApi(AndroidHelper.API_23) public static CarrierConfigManager carrierConfigManager() { return (CarrierConfigManager) get(Context.CARRIER_CONFIG_SERVICE); }
/** * Obtain a {@link CarrierConfigManager} instance associated with specified {@link Context} * * @param context Context * @return {@link CarrierConfigManager} associated with specified {@link Context} * @throws InvalidContextException if {@link CarrierConfigManager} can't be obtained * from specified {@link Context} */ @NonNull @RequiresApi(Build.VERSION_CODES.M) public static CarrierConfigManager getCarrierConfigManager(@NonNull Context context) { return validate(context.getSystemService(Context.CARRIER_CONFIG_SERVICE)); }