/** * 返回 {@link HardwarePropertiesManager} */ public static HardwarePropertiesManager getHardwarePropertiesManager() { return (HardwarePropertiesManager) get(HARDWARE_PROPERTIES_SERVICE); }
/** * @since 4.0.0 */ public static HardwarePropertiesManager hardwareProperties(Context context) { return (HardwarePropertiesManager) context.getSystemService(HARDWARE_PROPERTIES_SERVICE); }
@TargetApi(AndroidHelper.API_24) public static HardwarePropertiesManager hardwarePropertiesService() { return (HardwarePropertiesManager) get(Context.HARDWARE_PROPERTIES_SERVICE); }
/** * Obtain a {@link HardwarePropertiesManager} instance associated with specified {@link Context} * * @param context Context * @return {@link HardwarePropertiesManager} associated with specified {@link Context} * @throws InvalidContextException if {@link HardwarePropertiesManager} can't be obtained * from specified {@link Context} */ @NonNull @RequiresApi(Build.VERSION_CODES.N) public static HardwarePropertiesManager getHardwarePropertiesManager(@NonNull Context context) { return validate(context.getSystemService(Context.HARDWARE_PROPERTIES_SERVICE)); }