项目:EasyAndroid
文件:Managers.java
/**
* 返回 {@link HardwarePropertiesManager}
*/
public static HardwarePropertiesManager getHardwarePropertiesManager()
{
return (HardwarePropertiesManager) get(HARDWARE_PROPERTIES_SERVICE);
}
项目:sprockets-android
文件:Managers.java
/**
* @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);
}
项目:android-wheels
文件:ContextUtils.java
/**
* 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));
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。