获取开启的辅助服务列表
来源:互联网 发布:韩语翻译软件 编辑:程序博客网 时间:2024/04/29 20:28
static final char ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR = ':';
// Auxiliary members.
final static SimpleStringSplitter sStringColonSplitter =
new SimpleStringSplitter(ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR);
static Set<ComponentName> getEnabledServicesFromSettings(Context context) {
final String enabledServicesSetting = Settings.Secure.getString(
context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
if (enabledServicesSetting == null) {
return Collections.emptySet();
}
final Set<ComponentName> enabledServices = new HashSet<ComponentName>();
final SimpleStringSplitter colonSplitter = sStringColonSplitter;
colonSplitter.setString(enabledServicesSetting);
while (colonSplitter.hasNext()) {
final String componentNameString = colonSplitter.next();
final ComponentName enabledService = ComponentName.unflattenFromString(
componentNameString);
if (enabledService != null) {
enabledServices.add(enabledService);
}
}
return enabledServices;
}
// Auxiliary members.
final static SimpleStringSplitter sStringColonSplitter =
new SimpleStringSplitter(ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR);
static Set<ComponentName> getEnabledServicesFromSettings(Context context) {
final String enabledServicesSetting = Settings.Secure.getString(
context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
if (enabledServicesSetting == null) {
return Collections.emptySet();
}
final Set<ComponentName> enabledServices = new HashSet<ComponentName>();
final SimpleStringSplitter colonSplitter = sStringColonSplitter;
colonSplitter.setString(enabledServicesSetting);
while (colonSplitter.hasNext()) {
final String componentNameString = colonSplitter.next();
final ComponentName enabledService = ComponentName.unflattenFromString(
componentNameString);
if (enabledService != null) {
enabledServices.add(enabledService);
}
}
return enabledServices;
}
0 0
- 获取开启的辅助服务列表
- 登录成功开启服务获取融云好友列表
- 获取一个服务的开启状态
- Debian GNU Linux服务列表的获取、服务的关闭/开启、服务在启动时是否自动运行的生效/失效
- Android新手上路-记录一个辅助服务相关无法开启的暂时原因不明的坑
- 获取本地服务列表
- 获取系统服务列表
- 开启Eclipse的自动辅助功能
- 监听辅助功能的开启状态
- 使用VBS获取当前计算机上开启的服务
- 系统开启的服务
- 服务的开启方式
- telnet 服务的开启
- 服务的开启方式
- 服务的开启,停止。
- php服务的开启
- 获取进程、服务、任务列表
- IOS移动端如何获取ArcGIS Server的服务列表
- xml的复杂解析取值和节点插入导出合并后的xml文件
- 第十一周阅读程序6:基类、派生类中构造函数、析构函数
- 毕业季:90后开发者cocos经验谈——如何入行、如何进步
- 面试题38 数字在排序数组找那个出现的次数
- 网站常用主流网站数据库介绍
- 获取开启的辅助服务列表
- 区间dp LightOj 1422 Halloween Costumes
- linux实验一 一个简单的拷贝程序
- Object-c多态
- CSS字体教程
- Jquery attr("checked") 返回checked或undefined 获取选中失效
- SQL注入原理讲解,很不错!
- GUI
- CSS链接教程