[Android General] alexega:
Nougat - Network signal and WI-FI - left, right

SystemUI\res\values\ids.xml

Add

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

SystemUI\res\layout\notification_icon_area.xml

after

xmlns:android="http://schemas.android.com/apk/res/android">

Add

<LinearLayout android:textColor="#ffffffff" android:orientation="horizontal" android:id="@id/leftsignal" android:paddingTop="5.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="0.0dip" android:paddingEnd="0.0dip" android:layout_marginStart="0.0dip" android:layout_marginEnd="-1.0dip" android:layout_alignParentStart="true" />

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

after

invoke-virtual {v3, v4, v7, v5}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
const/4 v4, 0x0
invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;->onChange(Z)V

Add

move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateKygrdHideLeftSignal()V
const/4 v7, 0x0
const-string v8, "leftsignal"
invoke-static {v8, v7}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I
move-result v8
if-nez v8, :cond_11_
goto :goto_3_
:cond_11_
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateSignalPosition()V
:goto_3_

before

.method public updateStackScrollerState(ZZ)V

add

.method public updateSignalPosition()V
.locals 15
const/4 v8, 0x0
const/4 v12, 0x1
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
const-string v7, "leftsignal"
invoke-static {v6, v7, v8}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v7, 0x7f130473 [COLOR="Red"]## <public type="id" name="leftsignal" id="0x7f130473" />[/COLOR]
invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/LinearLayout;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v7, 0x7f1302c6 [COLOR="Red"]## <public type="id" name="notification_icon_area_inner" id="0x7f1302c6" />[/COLOR]
invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/LinearLayout;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v9, 0x7f1303c4 [COLOR="Red"]## <public type="id" name="signal_cluster" id="0x7f1303c4" />[/COLOR]
invoke-virtual {v6, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/statusbar/SignalClusterView;
invoke-virtual {v0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v9
check-cast v9, Landroid/widget/LinearLayout;
invoke-virtual {v9, v0}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V
if-nez v1, :cond_0
invoke-virtual {v4, v0, v8}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
const v1, 0x3f800000 # 1.0f
invoke-virtual {v0, v1}, Landroid/view/View;->setAlpha(F)V
:goto_0
return-void
:cond_0
invoke-virtual {v4, v0, v8}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
const/high16 v1, 0x3f800000 # 1.0f
invoke-virtual {v0, v1}, Landroid/view/View;->setAlpha(F)V
goto :goto_0
.end method

before

.method public updateMediaMetaData(ZZ)V

add

.method updateKygrdHideLeftSignal()V
.locals 5
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mKeyguardStatusBar:Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;
const v1, 0x7f1303c4 [COLOR="Red"]## <public type="id" name="signal_cluster" id="0x7f1303c4" />[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/statusbar/SignalClusterView;
const v1, 0x1
const/16 v2, 0x8
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "leftsignal"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
const v4, 0x0
if-eq v3, v4, :cond_0
:goto_0
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
return-void
:cond_0
const/4 v2, 0x1
goto :goto_0
.end method

Add

https://xdaforums.com/showpost.php?p=67930675&postcount=8317

Add

https://xdaforums.com/showpost.php?p=68142830&postcount=8872

Note

after

const-string/jumbo v3, "com.android.systemui.statusbar.OPERATOR_LOGO_UPDATE"
invoke-virtual {v6, v3}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
:cond_12

add

move-object/from16 v0, p0
invoke-direct {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->registerGearObserver()V

before

.method public onCoverAppCovered(Z)I

add

.method public onContentChanged(Ljava/lang/String;)V
.locals 1
const-string v0, "leftsignal"
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateKygrdHideLeftSignal()V
:cond_0
const-string v0, "leftsignal"
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateSignalPosition()V
:cond_1
return-void
.end method

before

.method private reinflateSignalCluster(Landroid/view/View;)Lcom/android/systemui/statusbar/SignalClusterView;

add

.method private registerGearObserver()V
.locals 7
.prologue
new-instance v3, Lcom/android/wubydax/GearContentObserver;
new-instance v4, Landroid/os/Handler;
invoke-direct {v4}, Landroid/os/Handler;-><init>()V
invoke-direct {v3, v4, p0}, Lcom/android/wubydax/GearContentObserver;-><init>(Landroid/os/Handler;Lcom/android/wubydax/GearContentObserver$OnContentChangedListener;)V
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mGearContentObserver:Lcom/android/wubydax/GearContentObserver;
iget-object v3, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
const-string v3, "leftsignal"
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v3
:goto_0
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_0
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
invoke-static {v2}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v4
const/4 v5, 0x0
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mGearContentObserver:Lcom/android/wubydax/GearContentObserver;
invoke-virtual {v1, v4, v5, v6}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
goto :goto_0
:cond_0
return-void
.end method

Rom Control v2

and arrays

<string-array name="SignalPositionName">
<item>Right, reboot SystemUI</item>
<item>Left</item>
</string-array>
<string-array name="SignalPositionValue">
<item>0</item>
<item>1</item>
</string-array>

add

<com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/SignalPositionName" android:title="Signal Position" android:key="leftsignal" android:defaultValue="0" android:entryValues="@array/SignalPositionValue" />