diff --git a/README.md b/README.md index 4fb90a0..3a7c600 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ A collection of small Xposed Modules. | [PersistentForegroundServiceNotifications](PersistentForegroundServiceNotifications) | [@binarynoise](https://github.com/binarynoise) | Make notifications of foreground services persistent again | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=persistentForegroundServiceNotifications) | | [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) | | [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) | +| [UpsideWifi](UpsideWifi) | [@programminghoch10](https://github.com/programminghoch10) | Turn the WiFi icon upside down | [GitHub](https://github.com/binarynoise/XposedModulets/releases?q=UpsideWifi) | ## License diff --git a/UpsideWifi/Readme.md b/UpsideWifi/Readme.md new file mode 100644 index 0000000..2c7cb2b --- /dev/null +++ b/UpsideWifi/Readme.md @@ -0,0 +1,4 @@ +# UpsideWifi +Xposed Module to turn the Wi-Fi icon upside down. + +This is a modified version of the legendary module [UpsideWifi](https://github.com/rye761/upsidewifi) by [rye761](https://github.com/rye761). diff --git a/UpsideWifi/build.gradle.kts b/UpsideWifi/build.gradle.kts new file mode 100644 index 0000000..f3b63aa --- /dev/null +++ b/UpsideWifi/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + alias(libs.plugins.buildlogic.android.application) +} + +android { + namespace = "com.programminghoch10.UpsideWifi" + + defaultConfig { + minSdk = 21 + targetSdk = 35 + } +} diff --git a/UpsideWifi/src/main/AndroidManifest.xml b/UpsideWifi/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2378069 --- /dev/null +++ b/UpsideWifi/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/UpsideWifi/src/main/assets/xposed_init b/UpsideWifi/src/main/assets/xposed_init new file mode 100644 index 0000000..bc186aa --- /dev/null +++ b/UpsideWifi/src/main/assets/xposed_init @@ -0,0 +1 @@ +com.programminghoch10.UpsideWifi.UpsideWifi diff --git a/UpsideWifi/src/main/java/com/programminghoch10/UpsideWifi/UpsideWifi.java b/UpsideWifi/src/main/java/com/programminghoch10/UpsideWifi/UpsideWifi.java new file mode 100644 index 0000000..fdb6ab3 --- /dev/null +++ b/UpsideWifi/src/main/java/com/programminghoch10/UpsideWifi/UpsideWifi.java @@ -0,0 +1,32 @@ +package com.programminghoch10.UpsideWifi; + +import android.annotation.SuppressLint; +import android.os.Build; +import android.widget.ImageView; + +import de.robv.android.xposed.IXposedHookInitPackageResources; +import de.robv.android.xposed.callbacks.XC_InitPackageResources; +import de.robv.android.xposed.callbacks.XC_LayoutInflated; + +public class UpsideWifi implements IXposedHookInitPackageResources { + final String PACKAGE_SYSTEMUI = "com.android.systemui"; + ImageView wifiIndicator; + + @Override + public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam resparam) throws Throwable { + if (!resparam.packageName.equals(PACKAGE_SYSTEMUI)) { + return; + } + String layoutName = + Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE ? "new_status_bar_wifi_group" : + (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ? "status_bar_wifi_group" : "signal_cluster_view"); + resparam.res.hookLayout(PACKAGE_SYSTEMUI, "layout", layoutName, new XC_LayoutInflated() { + @SuppressLint("DiscouragedApi") + @Override + public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable { + wifiIndicator = liparam.view.findViewById(liparam.res.getIdentifier("wifi_signal", "id", PACKAGE_SYSTEMUI)); + wifiIndicator.setRotation(180); + } + }); + } +} diff --git a/UpsideWifi/src/main/res/drawable/ic_launcher_foreground.xml b/UpsideWifi/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..d42fa51 --- /dev/null +++ b/UpsideWifi/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/UpsideWifi/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/UpsideWifi/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..7353dbd --- /dev/null +++ b/UpsideWifi/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/UpsideWifi/src/main/res/mipmap-hdpi/ic_launcher.png b/UpsideWifi/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..993f37c Binary files /dev/null and b/UpsideWifi/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/UpsideWifi/src/main/res/mipmap-mdpi/ic_launcher.png b/UpsideWifi/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..99fa758 Binary files /dev/null and b/UpsideWifi/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/UpsideWifi/src/main/res/mipmap-xhdpi/ic_launcher.png b/UpsideWifi/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..a2928a3 Binary files /dev/null and b/UpsideWifi/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/UpsideWifi/src/main/res/mipmap-xxhdpi/ic_launcher.png b/UpsideWifi/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..dd8fada Binary files /dev/null and b/UpsideWifi/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/UpsideWifi/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/UpsideWifi/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..e46e855 Binary files /dev/null and b/UpsideWifi/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/UpsideWifi/src/main/res/values/arrays.xml b/UpsideWifi/src/main/res/values/arrays.xml new file mode 100644 index 0000000..d59502d --- /dev/null +++ b/UpsideWifi/src/main/res/values/arrays.xml @@ -0,0 +1,6 @@ + + + + com.android.systemui + + diff --git a/UpsideWifi/src/main/res/values/colors.xml b/UpsideWifi/src/main/res/values/colors.xml new file mode 100644 index 0000000..beab31f --- /dev/null +++ b/UpsideWifi/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #000000 + \ No newline at end of file diff --git a/UpsideWifi/src/main/res/values/strings.xml b/UpsideWifi/src/main/res/values/strings.xml new file mode 100644 index 0000000..08641a4 --- /dev/null +++ b/UpsideWifi/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + UpsideWifi + Turn the WiFi icon upside down! + diff --git a/metadata/com.programminghoch10.UpsideWifi/en-US/full_description.txt b/metadata/com.programminghoch10.UpsideWifi/en-US/full_description.txt new file mode 100644 index 0000000..be5dcde --- /dev/null +++ b/metadata/com.programminghoch10.UpsideWifi/en-US/full_description.txt @@ -0,0 +1 @@ +This Xposed Module turns the statusbar WiFi icon upside down. diff --git a/metadata/com.programminghoch10.UpsideWifi/en-US/images/icon.png b/metadata/com.programminghoch10.UpsideWifi/en-US/images/icon.png new file mode 100644 index 0000000..ec21d5a Binary files /dev/null and b/metadata/com.programminghoch10.UpsideWifi/en-US/images/icon.png differ diff --git a/metadata/com.programminghoch10.UpsideWifi/en-US/short_description.txt b/metadata/com.programminghoch10.UpsideWifi/en-US/short_description.txt new file mode 100644 index 0000000..8664222 --- /dev/null +++ b/metadata/com.programminghoch10.UpsideWifi/en-US/short_description.txt @@ -0,0 +1 @@ +Turn the WiFi icon upside down. \ No newline at end of file diff --git a/metadata/com.programminghoch10.UpsideWifi/en-US/title.txt b/metadata/com.programminghoch10.UpsideWifi/en-US/title.txt new file mode 100644 index 0000000..f8b014e --- /dev/null +++ b/metadata/com.programminghoch10.UpsideWifi/en-US/title.txt @@ -0,0 +1 @@ +UpsideWifi \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 9e87da6..667cf53 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -56,6 +56,7 @@ include(":PersistentForegroundServiceNotifications") include(":PreventAudioFocus") include(":ResetAllNotificationChannels") include(":RotationControl") +include(":UpsideWifi") include(":reflection") include(":logger")