Android2.1 Framework Remove StatusBar Clock and Battery

119 views
Skip to first unread message

tommy.hong

unread,
Sep 21, 2011, 10:20:01 PM9/21/11
to android-...@googlegroups.com, android...@googlegroups.com, android_industry_aut...@googlegroups.com

/*

 *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

--
Chinese Name:Hong jiu jin
Android,Internet of Things,Embedded System Design and Develop
English Name:Tommy
Tel: +86 1367514 8249
Skype ID:hongjiujing 
Blog: http://internetofthings.blogbus.com/
Country:China
There are three types of people in this world: those who make things happen, those who watch things happen and those who wonder what happened.

Shrenik Vikam

unread,
Aug 24, 2012, 1:05:09 AM8/24/12
to android...@googlegroups.com, android-...@googlegroups.com, android_industry_aut...@googlegroups.com
How I can achieve same in ICS or JB ?
Reply all
Reply to author
Forward
0 new messages