一:如何自定义TextView实现滚动效果 继承TextView基类 重写构造方法 修改isFocused()方法,获取焦点. /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the…
一 :Bluetooth 的设置应用 packages\apps\Settings\src\com\android\settings\bluetooth* 蓝牙设置应用及设置参数,蓝牙状态,蓝牙设备等. BluetoothDevicePreference.java 顾名思义,蓝牙设备首选项,也就是蓝牙设备的配置信息,比如是否连接,是否配对,是否可见等等.该类继承了preference类,主要是提供获取蓝牙设备及通知蓝牙设备配置信息变化. BluetoothDiscoverableEnabler.…
一:init.rc文件修改 开机后运行一次: chmod 777 /system/bin/bt_config.sh service bt_config /system/bin/bt_config.sh class main user root group root oneshot 开机后等待android启动完成后再运行: service bt_config /system/bin/bt_config.sh class main user root group root disabled one…
一: 进入shell命令界面 adb shell 二:创建目录/cache/recovery mkdir /cache/recovery 如果系统中已有此目录,则会提示已存在. 三: 修改文件夹权限 chmod -R 777 /cache/recovery 四: 把ota文件路径写入/cache/recovery/command文件中 echo "--update_package=系统ota升级包文件路径 " > /cache/recovery/command 如我的OTA升级包…
一:原理分析 主要sendExtraCommand方法中传递两个参数, 根据如下源码可以知道第一个参数传递delete_aiding_data,第二个参数传递null即可. @Override public boolean sendExtraCommand(String command, Bundle extras) { long identity = Binder.clearCallingIdentity(); boolean result = false; if ("delete_aidin…
一:SharedPreference如何使用 此文章只是提供一种数据保存的方式, 具体使用场景请根据需求情况自行调整. EditText添加saveData点击事件, 保存数据. diff --git a/res/layout/activity_voicemail_settings.xml b/res/layout/activity_voicemail_settings.xml index cd7af05..57526f2 100755 --- a/res/layout/activity_voi…
一:如何添加快捷开关 源码路径:frameworks/base/packages/SystemUI/res/values/config.xml 添加headset快捷开关,参考如下修改. Index: res/values/config.xml =================================================================== --- res/values/config.xml (版本 6870) +++ res/values/config.x…
一:aar文件如何引用 系统Settings中引用bidehelper-1.1.12.aar 文件为例 源码地址:packages/apps/Settings/Android.mk LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ $(call all-logtags-files-under, src) LOCAL_MODULE := settings-logtags include $(BUILD_ST…
一:关机菜单添加飞行模式选项 源码路径:frameworks/base/core/res/res/values/config.xml 增加<item>airplane</item> <!-- Defines the default set of global actions. Actions may still be disabled or hidden based on the current state of the device. Each item must be o…
一 : 修改Android系统默认时间 源码路径:frameworks/base/services/java/com/android/server/SystemServer.java 主要变量EARLIEST_SUPPORTED_TIME // The earliest supported time. We pick one day into 1970, to // give any timezone code room without going into negative time. pri…