Skip to content

Commit ee08501

Browse files
add UpsideWifi (#13)
migrated from https://github.com/programminghoch10/UpsideWifi Co-authored-by: binarynoise <[email protected]>
1 parent 8f27b95 commit ee08501

File tree

21 files changed

+112
-0
lines changed

21 files changed

+112
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ A collection of small Xposed Modules.
1919
| [PersistentForegroundServiceNotifications](PersistentForegroundServiceNotifications) | [@binarynoise](https://github.com/binarynoise) | Make notifications of foreground services persistent again | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=persistentForegroundServiceNotifications) |
2020
| [ResetAllNotificationChannels](ResetAllNotificationChannels) | [@binarynoise](https://github.com/binarynoise) | Reset all Notification Channels: vibrations, ringtones, importance etc. | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=resetAllNotificationChannels) [IzzyOnDroid](https://apt.izzysoft.de/fdroid/index/apk/de.binarynoise.resetAllNotificationChannels) |
2121
| [RotationControl](RotationControl) | [@programminghoch10](https://github.com/programminghoch10) | Force rotation for selected packages | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=RotationControl) [IzzyOnDroid](https://apt.izzysoft.de/fdroid/index/apk/com.programminghoch10.RotationControl) |
22+
| [UpsideWifi](UpsideWifi) | [@programminghoch10](https://github.com/programminghoch10) | Turn the WiFi icon upside down | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=UpsideWifi) |
2223
<!--@formatter:on-->
2324

2425
## License

UpsideWifi/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# UpsideWifi
2+
Xposed Module to turn the Wi-Fi icon upside down.
3+
4+
This is a modified version of the legendary module [UpsideWifi](https://github.com/rye761/upsidewifi) by [rye761](https://github.com/rye761).

UpsideWifi/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
plugins {
2+
alias(libs.plugins.buildlogic.android.application)
3+
}
4+
5+
android {
6+
namespace = "com.programminghoch10.UpsideWifi"
7+
8+
defaultConfig {
9+
minSdk = 21
10+
targetSdk = 35
11+
}
12+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.programminghoch10.UpsideWifi">
5+
6+
<application
7+
android:label="@string/app_name"
8+
android:icon="@mipmap/ic_launcher"
9+
tools:ignore="AllowBackup">
10+
<meta-data
11+
android:name="xposedmodule"
12+
android:value="true"/>
13+
<meta-data
14+
android:name="xposeddescription"
15+
android:value="@string/xposed_description"/>
16+
<meta-data
17+
android:name="xposedminversion"
18+
android:value="30"/>
19+
<meta-data
20+
android:name="xposedscope"
21+
android:resource="@array/scope"/>
22+
</application>
23+
24+
</manifest>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.programminghoch10.UpsideWifi.UpsideWifi
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.programminghoch10.UpsideWifi;
2+
3+
import android.annotation.SuppressLint;
4+
import android.os.Build;
5+
import android.widget.ImageView;
6+
7+
import de.robv.android.xposed.IXposedHookInitPackageResources;
8+
import de.robv.android.xposed.callbacks.XC_InitPackageResources;
9+
import de.robv.android.xposed.callbacks.XC_LayoutInflated;
10+
11+
public class UpsideWifi implements IXposedHookInitPackageResources {
12+
final String PACKAGE_SYSTEMUI = "com.android.systemui";
13+
ImageView wifiIndicator;
14+
15+
@Override
16+
public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam resparam) throws Throwable {
17+
if (!resparam.packageName.equals(PACKAGE_SYSTEMUI)) {
18+
return;
19+
}
20+
String layoutName =
21+
Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE ? "new_status_bar_wifi_group" :
22+
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ? "status_bar_wifi_group" : "signal_cluster_view");
23+
resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", layoutName, new XC_LayoutInflated() {
24+
@SuppressLint("DiscouragedApi")
25+
@Override
26+
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
27+
wifiIndicator = liparam.view.findViewById(liparam.res.getIdentifier("wifi_signal", "id", PACKAGE_SYSTEMUI));
28+
wifiIndicator.setRotation(180);
29+
}
30+
});
31+
}
32+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="108"
5+
android:viewportHeight="108">
6+
<group android:scaleX="0.12722892"
7+
android:scaleY="0.12722892"
8+
android:translateX="27.6"
9+
android:translateY="33.017242">
10+
<path
11+
android:pathData="M415,253C290.5,351.5 118,349 0.5,253L41.9,202.5C136,281 282.5,281.5 373.5,202.5L415,253ZM364.049,191C276.5,262.5 151.5,269 51.328,191L91.498,142C164,198.5 260.71,194.5 323.782,142L364.049,191ZM313.921,130C248.5,177.571 179.5,183.5 101.336,130L144.153,77.771C182.5,108.5 230.5,109.5 271,77.771L313.921,130ZM260.71,65.25C231.5,91 182,92.5 154.418,65.25L207.5,0.5L260.71,65.25Z"
12+
android:fillColor="#33B6EA"
13+
android:fillType="evenOdd"/>
14+
</group>
15+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>
Loading
Loading

0 commit comments

Comments
 (0)