[tw] carrier logo/text in notification bar

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,644
2,730
0
50
Pittsburgh, PA
I've been playing around with trying to get rid of the carrier text that the AT&T variant of the Note II displays in the notification bar if there are no other notification icons up there.

After abusing apktook to get the smali/xml, I find that the carrier logo/text is handled in layout\tw_status_bar.xml. The offending (offensive?) section is:
Code:
            <TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
The visibility is already set to gone, so changing that won't do the trick. If I delete that textview, systemUI crashes (which kind of makes sense.) I considered setting the entire LinearLayout with a "gone" visibility, but there are other items in that particular LinearLayout that I want visible at times.

Short of hacking the smali deal with this (and I'd be at a loss as to how to go about that right now), is there a way to get rid of just that one carrierLabel?

I've included the entire tw_status_bar.xml file as a code block below for easy viewing (but please don't quote the entire thing when replying.)

Thanks
Gary

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <ImageView android:id="@id/notification_lights_out" android:paddingLeft="6.0dip" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" />
    <LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="0.0dip" android:paddingRight="2.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:orientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
            <ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" android:alpha="0.7" android:scaleX="0.85" android:scaleY="0.85" />
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
        </LinearLayout>
        <LinearLayout android:orientation="horizontal" android:id="@id/right_icons" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
                <TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
                <ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_old" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_new" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
 

jug6ernaut

Inactive Recognized Developer
Jun 7, 2006
2,560
467
0
San Antonio, Tx
Short of hacking the smali deal with this (and I'd be at a loss as to how to go about that right now), is there a way to get rid of just that one carrierLabel?

I've included the entire tw_status_bar.xml file as a code block below for easy viewing (but please don't quote the entire thing when replying.)

Thanks
Gary
(Fair warning i have never done any modding/apk editing of any sorts lol).

Have you tried manually specifying the size of the view to 1x1 pixels? I mean technically it would still be there but reasonably should not be view-able.
 

MonsterBandit

Senior Member
Dec 10, 2010
727
471
0
New Jersey
Same idea over here. I've done similiar things by setting the height/fontsize to 0.
I agree...in researching softkey mods its suggested that when you want to remove one of the options from the navbar to set the fontsize/height/dip to 0.0 instead of just deleting the lines. Hope this helps...i can attach the link to the thread of needed

Sent from my SAMSUNG-SGH-I317 using xda app-developers app
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,538
11,594
113
Gary, have you considered the xposed framework for this? It sounds like a good way to just get rid of it by hooking the method showing it with a null method
 

lickarock

Senior Member
Oct 18, 2009
799
564
0
32
Overland Park
Ahhh... I found a way to (kinda-sorta) do this on the SII. And I see no reason why it shouldn't work here.

Yes, it's cheating. But it works.

Find the hex that controls the color for the carrier identifier. A good majority of what is in SystemUI is colored with transparency hexes. Yeah... you already see where I am going with this. Change those first two digits on your hex to 00.

Technically, yeah, its still there. But that doesn't mean you have to look at it.




Edit: Or just do what the guy above me posted.
 

devabhishek

Senior Member
Sep 2, 2009
1,084
2,094
0
pune
i have a international version of this device , so i can not be in your boots :) , in the international version the carrier text is located in tw statusbar expanded .xml ,

can you share the systemui.apk and the frmework-res.apk and the twframework-res.apk ? so that i can also take a look and try it ,
 

garyd9

Inactive Recognized Developer
Sep 13, 2006
2,644
2,730
0
50
Pittsburgh, PA
Just a followup with this (that I forgot about): I ended up changing the font size to 0.0 and that did exactly what I wanted.

I explored the option for editing the smali for updateNetworkName, but decided that I wasn't happy with the side effect of it causing the network name disappearing from some other areas in the UI.

Thank you,
Gary
 

ssojyeti2

Senior Member
Jan 27, 2011
3,373
2,945
0
Miami
looks like the carrier logo name is located in "drawable/tw_stat_notify_operator_logo". So that would mean SystemUI.apk/res/drawable/tw_stat_notify_operator_logo.xml. Changing the string text in that xml should do the trick.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone