今天将android2.1中状态栏中手机、3G等信号图片去除掉,因为开发android2.1 是作MID终端使用,手机模块用不着,信号在状态栏上不和谐了。

目录:frameworks/base/services/java/com/android/server/status/StatusBarPolicy.java

主要除去两部分:

(1)在 private StatusBarPolicy(Context context, StatusBarService service) 中去除下面关于手机信号的部分代码


 /* phone_signal
        mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
        mPhoneData = IconData.makeIcon("phone_signal",
                null, com.android.internal.R.drawable.stat_sys_signal_null, 0, 0);
        mPhoneIcon = service.addIcon(mPhoneData, null);

        // register for phone state notifications.
        ((TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE))
                .listen(mPhoneStateListener,
                          PhoneStateListener.LISTEN_SERVICE_STATE
                         | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
                         | PhoneStateListener.LISTEN_CALL_STATE
                        | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
                        | PhoneStateListener.LISTEN_DATA_ACTIVITY);

        // data_connection
        mDataData = IconData.makeIcon("data_connection",
                null, com.android.internal.R.drawable.stat_sys_data_connected_g, 0, 0);
        mDataIcon = service.addIcon(mDataData, null);
        service.setIconVisibility(mDataIcon, false);
*/

/*   mCdmaRoamingIndicatorIconData = IconData.makeIcon("cdma_eri",
                null, com.android.internal.R.drawable.stat_sys_roaming_cdma_0, 0, 0);
        mCdmaRoamingIndicatorIcon = service.addIcon(mCdmaRoamingIndicatorIconData, null);
        service.setIconVisibility(mCdmaRoamingIndicatorIcon, false);  */

(2)去除过滤信号部分

//  filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);

还有接受方法onReceive(Context context, Intent intent)中代码


/*else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
                updateSimState(intent);
            }*/

 


 

posted on 2011-01-04 16:59  a樂飨z  阅读(659)  评论(0编辑  收藏  举报