Notification Light 框架分离
platform/frameworks/base / services/java/com/android/server/SystemServer.java
try { //设置系统 服务使用自定义 CusNotificationManagerService mSystemServiceManager.startService("com.android.server.notification.CusNotificationManagerService"); } catch (Exception e) { Slog.d(TAG,"create CusNotificationManagerService error:"+ e.toString()); mSystemServiceManager.startService(NotificationManagerService.class); }
CusNotificationManagerService.java
/frameworks/base / services/core/java/com/android/server/notification/NotificationManagerService.java
... else if (action.equals(Intent.ACTION_USER_PRESENT)) { // 去掉 --- // mNotificationLight.turnOff(); }
platform/frameworks/base / services/core/java/com/android/server/BatteryService.java
private void processValuesLocked(boolean force) { //---------------- 去掉 battery service的控制, 会和 notificationService 的控制起冲突----- //mLed.updateLightsLocked(); }
/frameworks / base/core/res/res/values/config.xml
设置颜色和灭 亮 <integer name="config_notificationsShortLedOn">300</integer> <integer name="config_notificationsShortLedOff">700</integer> <integer name="config_notificationsLongLedOn">500</integer> <integer name="config_notificationsLongLedOff">4500</integer> <integer name="config_notificationsbatteryWarning">20</integer> /vendor/wingos/frameworks / base/core/res/res/values/symbols.xml <java-symbol type="integer" name="config_notificationsShortLedOn" /> <java-symbol type="integer" name="config_notificationsShortLedOff" /> <java-symbol type="integer" name="config_notificationsLongLedOn" /> <java-symbol type="integer" name="config_notificationsLongLedOff" /> <java-symbol type="integer" name="config_notificationsbatteryWarning" />
/vendor/wingos/frameworks / base/core/res/res/values/config.xml
<integer name="config_notificationsbatteryWarning">15</integer>