[Android General] alexega:
Nougat - Stock Internet speed in the status bar: the left and right

system/csc/others.xml

add

<CscFeature_Setting_SupportRealTimeNetworkSpeed>TRUE</CscFeature_Setting_SupportRealTimeNetworkSpeed>

Speed option to the left instead of the right!

SystemUI\res\layout\system_icons.xml

replace

<com.android.systemui.statusbar.policy.NetspeedViewd android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="center" android:id="@id/networkSpeed" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="no" android:layout_marginEnd="@dimen/netspeed_margin_end" />

on

<com.android.systemui.statusbar.policy.NetspeedViewd android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="center" android:id="@id/networkSpeed" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip" android:importantForAccessibility="no" android:layout_marginEnd="@dimen/netspeed_margin_end" />

SystemUI\res\layout\notification_icon_area.xml

after

.......schemas.android.com/apk/res/android">

add

<com.android.systemui.statusbar.policy.NetspeedViewd android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="center" android:id="@id/networkSpeed" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="no" android:layout_marginEnd="@dimen/netspeed_margin_end" />

Speed option and left and right!

system/csc/others.xml

<CscFeature_Setting_SupportRealTimeNetworkSpeed>TRUE</CscFeature_Setting_SupportRealTimeNetworkSpeed>

SystemUI\res\values\ids.xml

<item type="id" name="networkSpeedd">false</item>

SystemUI\res\layout\notification_icon_area.xm

after

.......schemas.android.com/apk/res/android">

add

<com.android.systemui.statusbar.policy.NetspeedViewd android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="center" android:id="@id/networkSpeedd" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="no" android:layout_marginEnd="@dimen/netspeed_margin_end" />

SystemUI\smali\com\android\systemui\statusbar\policy

make a new smali, adding everywhere

NetspeedViewd [COLOR="Red"]>>>[/COLOR] NetspeedViewdd
network_speed [COLOR="Red"]>>>[/COLOR] network_speedd

add new smali

NetspeedViewd$1.smali
NetspeedViewd$2.smali
NetspeedViewd$NetworkSpeedManager$1.smali
NetspeedViewd$NetworkSpeedManager.smali
NetspeedViewd.smali

SystemUI\smali\com\android\systemui\statusbar\phone\StatusBarIconController.smali

after

.field private mClock:Landroid/widget/TextView;

add

.field private mSpeedLeft:Landroid/widget/TextView;

after

const v2, 0x7f1301cd [COLOR="Red"]## <public type="id" name="clock" id="0x7f1301cd" />[/COLOR]

invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/TextView;

iput-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mClock:Landroid/widget/TextView;

add

const v2, 0x7f13047a [COLOR="Red"]## <public type="id" name="networkSpeedd" id="0x7f1301cd" />[/COLOR]

invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/TextView;

iput-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mSpeedLeft:Landroid/widget/TextView;

after

iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mClock:Landroid/widget/TextView;

iget-object v4, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mTintArea:Landroid/graphics/Rect;

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mClock:Landroid/widget/TextView;

iget v6, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mIconTint:I

invoke-static {v4, v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->getTint(Landroid/graphics/Rect;Landroid/view/View;I)I

move-result v4

add

invoke-virtual {v2, v4}, Landroid/widget/TextView;->setTextColor(I)V

iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mSpeedLeft:Landroid/widget/TextView;

iget-object v4, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mTintArea:Landroid/graphics/Rect;

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mSpeedLeft:Landroid/widget/TextView;

iget v6, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mIconTint:I

invoke-static {v4, v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->getTint(Landroid/graphics/Rect;Landroid/view/View;I)I

move-result v4

Rom Conrol v2

<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Network speed - left" android:key="network_speedd" android:defaultValue="false" android:summaryOn="On" android:summaryOff="Off" />
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Network speed - right" android:key="network_speed" android:defaultValue="false" android:summaryOn="On" android:summaryOff="Off" />