Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from yujincheng08:master #197

Merged
merged 10 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.externalNativeBuild
*.apk
*.jar
/.kotlin
10 changes: 6 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ cmaker {
"-DCMAKE_CXX_STANDARD=23",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
)
cFlags += "-flto"
cppFlags += "-flto"
}

buildTypes {
Expand All @@ -48,9 +50,9 @@ cmaker {

android {
namespace = "me.iacn.biliroaming"
compileSdk = 34
buildToolsVersion = "34.0.0"
ndkVersion = "27.0.11718014-beta1"
compileSdk = 35
buildToolsVersion = "35.0.0"
ndkVersion = "27.0.12077973"

buildFeatures {
prefab = true
Expand All @@ -60,7 +62,7 @@ android {
defaultConfig {
applicationId = "me.iacn.biliroaming"
minSdk = 24
targetSdk = 34 // Target Android U
targetSdk = 35 // Target Android U
versionCode = appVerCode
versionName = appVerName
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/iacn/biliroaming/hook/JsonHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ class JsonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
?.setObjectField("followCard", null)
if (hidden && purifyLivePopups.contains("banner"))
result.setObjectField("bannerInfo", null)
if (hidden && sPrefs.getBoolean("no_live_mask", false))
result.setObjectField("areaMaskInfo", null)
}

liveRoomRecommendCardClass -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.iacn.biliroaming.hook

import de.robv.android.xposed.XposedHelpers
import me.iacn.biliroaming.utils.Log
import me.iacn.biliroaming.utils.findClassOrNull
import me.iacn.biliroaming.utils.hookBeforeMethod
Expand All @@ -23,6 +24,17 @@ class MusicNotificationHook(classLoader: ClassLoader) : BaseHook(classLoader) {
}
}
}

// Play store
"com.bilibili.lib.blconfig.ConfigManager\$a".findClassOrNull(mClassLoader)?.run {
XposedHelpers.findMethodExactIfExists(this, "g", String::class.java)?.hookBeforeMethod {
(it.args[0] as String).run {
if (this == "ff_background_use_system_media_controls") {
it.result = true
}
}
}
}
}

}
1 change: 0 additions & 1 deletion app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.28)
project(biliroaming)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_SCAN_FOR_MODULES ON)

find_package(cxx REQUIRED CONFIG)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/jni/biliroaming.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <algorithm>
#include <android/log.h>
#include <errno.h>
#include <fcntl.h>
#include <jni.h>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/jni/dex_builder
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,6 @@
<string name="copy_access_key_toast">已复制</string>
<string name="auto_dark_splash_title">启动屏背景适配深色</string>
<string name="auto_dark_splash_summary">防瞎眼</string>
<string name="no_live_mask_title">隐藏直播模糊遮罩</string>
<string name="no_live_mask_summary">隐藏部分直播的模糊遮罩</string>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/xml/prefs_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,11 @@
android:summary="@string/remove_up_vip_label_summary"
android:title="@string/remove_up_vip_label_title" />

<SwitchPreference
android:dependency="hidden"
android:key="no_live_mask"
android:summary="@string/no_live_mask_summary"
android:title="@string/no_live_mask_title" />
<MultiSelectListPreference
android:dependency="hidden"
android:entries="@array/live_popup_entries"
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
protobuf = "4.27.1"
protobuf = "4.27.2"
coroutine = "1.8.1"
kotlin = "2.0.0"

[plugins]
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
agp-app = { id = "com.android.application", version = "8.4.1" }
agp-app = { id = "com.android.application", version = "8.5.1" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
lsplugin-jgit = { id = "org.lsposed.lsplugin.jgit", version = "1.1" }
lsplugin-resopt = { id = "org.lsposed.lsplugin.resopt", version = "1.6" }
Expand All @@ -15,7 +15,7 @@ lsplugin-cmaker = { id = "org.lsposed.lsplugin.cmaker", version = "1.2" }

[libraries]
xposed = { module = "de.robv.android.xposed:api", version = "82" }
cxx = { module = "dev.rikka.ndk.thirdparty:cxx", version = "1.2.0" }
cxx = { module = "org.lsposed.libcxx:libcxx", version = "27.0.12077973" }
protobuf-kotlin = { module = "com.google.protobuf:protobuf-kotlin-lite", version.ref = "protobuf" }
protobuf-java = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf" }
protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Loading