找回密码
 注册
搜索
查看: 787|回复: 0

[讨论] Android2.1 remove StatusBar Clock and Battery in framework

[复制链接]
发表于 2011-9-22 13:50:38 | 显示全部楼层 |阅读模式
/*

*Android2.1 Framework Remove StatusBar Clock and Battery

*Industrial Board dont need StatusBar Clock and Time,So We disable them in framework by Safe way and reason of maintainablity
*Android2.1 use setIconVisibility  to achieve StatusBar Icons to display or not,and use Op to manage Icons according to Android ACTION events.

*in StatusBarService.java,makeStatusBarView exceute setAreThereNotifications for inital view visibility.

*/

Code:android_ecliar/frameworks/base/services/java/com/android/server/status/StatusBarPolicy.java

Code:android_ecliar/frameworks/base/services/java/com/android/server/status/StatusBarService.java


414,415d413
<       /*Jiujin.hong 2011/0922*/
<         service.setIconVisibility(mClockIcon, false);/*Jiujin.hong*/
422,423d419
<       /*Jiujin.hong 2011/0922*/
<         service.setIconVisibility(mBatteryIcon, false);/*Jiujin.hong*/
--- StatusBarPolicy.java        2011-09-22 09:51:27.616665586 +0800
+++ StatusBarPolicy.java.bk     2011-09-21 16:58:21.816810220 +0800
@@ -411,16 +411,12 @@
         mCalendar = Calendar.getInstance(TimeZone.getDefault());
         mClockData = IconData.makeText("clock", "");
         mClockIcon = service.addIcon(mClockData, null);
-       /*Jiujin.hong 2011/0922*/
-        service.setIconVisibility(mClockIcon, false);/*Jiujin.hong*/
         updateClock();

         // battery
         mBatteryData = IconData.makeIcon("battery",
                 null, com.android.internal.R.drawable.stat_sys_battery_unknown, 0, 0);
         mBatteryIcon = service.addIcon(mBatteryData, null);
-       /*Jiujin.hong 2011/0922*/
-        service.setIconVisibility(mBatteryIcon, false);/*Jiujin.hong*/

         // phone_signal
         mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);


Tommy
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-12-23 19:22 , Processed in 0.043710 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表