[app] RikkaX (#268)

This commit is contained in:
tehcneko 2021-03-05 15:41:20 +08:00 committed by GitHub
parent 1a5f809634
commit 5e5b4a976f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 24 deletions

View File

@ -144,6 +144,7 @@ dependencies {
implementation("androidx.activity:activity:1.2.0") implementation("androidx.activity:activity:1.2.0")
implementation("androidx.browser:browser:1.3.0") implementation("androidx.browser:browser:1.3.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.4") implementation("androidx.constraintlayout:constraintlayout:2.0.4")
implementation("androidx.core:core:1.3.2")
implementation("androidx.fragment:fragment:1.3.0") implementation("androidx.fragment:fragment:1.3.0")
implementation("androidx.recyclerview:recyclerview:1.1.0") implementation("androidx.recyclerview:recyclerview:1.1.0")
implementation("com.caverock:androidsvg-aar:1.4") implementation("com.caverock:androidsvg-aar:1.4")
@ -156,6 +157,15 @@ dependencies {
implementation("com.takisoft.preferencex:preferencex-colorpicker:1.1.0") implementation("com.takisoft.preferencex:preferencex-colorpicker:1.1.0")
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion") implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion") implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion")
implementation("dev.rikka.rikkax.appcompat:appcompat:1.2.0-rc01")
implementation("dev.rikka.rikkax.core:core:1.3.0")
implementation("dev.rikka.rikkax.insets:insets:1.0.1")
implementation("dev.rikka.rikkax.material:material:1.6.0")
implementation("dev.rikka.rikkax.preference:simplemenu-preference:1.0.0")
implementation("dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.2.0")
implementation("dev.rikka.rikkax.widget:borderview:1.0.1")
implementation("dev.rikka.rikkax.widget:switchbar:1.0.2")
implementation("dev.rikka.rikkax.layoutinflater:layoutinflater:1.0.1")
implementation("io.noties.markwon:core:$markwonVersion") implementation("io.noties.markwon:core:$markwonVersion")
implementation("io.noties.markwon:ext-strikethrough:$markwonVersion") implementation("io.noties.markwon:ext-strikethrough:$markwonVersion")
implementation("io.noties.markwon:ext-tables:$markwonVersion") implementation("io.noties.markwon:ext-tables:$markwonVersion")
@ -163,15 +173,6 @@ dependencies {
implementation("io.noties.markwon:html:$markwonVersion") implementation("io.noties.markwon:html:$markwonVersion")
implementation("io.noties.markwon:image-glide:$markwonVersion") implementation("io.noties.markwon:image-glide:$markwonVersion")
implementation("io.noties.markwon:linkify:$markwonVersion") implementation("io.noties.markwon:linkify:$markwonVersion")
implementation("rikka.appcompat:appcompat:1.2.0-rc01")
implementation("rikka.core:core:1.3.0")
implementation("rikka.insets:insets:1.0.1")
implementation("rikka.material:material:1.6.0")
implementation("rikka.recyclerview:recyclerview-utils:1.2.0")
implementation("rikka.widget:borderview:1.0.0")
implementation("rikka.widget:switchbar:1.0.2")
implementation("rikka.layoutinflater:layoutinflater:1.0.1")
implementation("tech.rectifier.preferencex-android:preferencex-simplemenu:88f93154b2")
implementation("me.zhanghai.android.appiconloader:appiconloader-glide:1.2.0") implementation("me.zhanghai.android.appiconloader:appiconloader-glide:1.2.0")
implementation("me.zhanghai.android.fastscroll:library:1.1.5") implementation("me.zhanghai.android.fastscroll:library:1.1.5")
implementation(files("libs/WeatherView-2.0.3.aar")) implementation(files("libs/WeatherView-2.0.3.aar"))

View File

@ -20,15 +20,13 @@
package io.github.lsposed.manager.util; package io.github.lsposed.manager.util;
import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import androidx.core.app.NotificationChannelCompat;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import io.github.lsposed.manager.R; import io.github.lsposed.manager.R;
import io.github.lsposed.manager.ui.activity.AppListActivity; import io.github.lsposed.manager.ui.activity.AppListActivity;
@ -41,14 +39,14 @@ public final class NotificationUtil {
private static final String NOTIFICATION_MODULES_CHANNEL = "modules_channel_2"; private static final String NOTIFICATION_MODULES_CHANNEL = "modules_channel_2";
public static void showNotification(Context context, String modulePackageName, String moduleName, boolean enabled) { public static void showNotification(Context context, String modulePackageName, String moduleName, boolean enabled) {
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannelCompat.Builder channel = new NotificationChannelCompat.Builder(NOTIFICATION_MODULES_CHANNEL, NotificationChannel channel = new NotificationChannel(NOTIFICATION_MODULES_CHANNEL,
NotificationManager.IMPORTANCE_HIGH) context.getString(R.string.Modules),
.setName(context.getString(R.string.Modules)) NotificationManager.IMPORTANCE_HIGH);
.setSound(null, null) channel.setSound(null, null);
.setVibrationPattern(null); channel.setVibrationPattern(null);
notificationManager.createNotificationChannel(channel.build()); notificationManager.createNotificationChannel(channel);
String title = context.getString(enabled ? R.string.xposed_module_updated_notification_title : R.string.module_is_not_activated_yet); String title = context.getString(enabled ? R.string.xposed_module_updated_notification_title : R.string.module_is_not_activated_yet);
String content = context.getString(enabled ? R.string.xposed_module_updated_notification_content : R.string.module_is_not_activated_yet_detailed, moduleName); String content = context.getString(enabled ? R.string.xposed_module_updated_notification_content : R.string.module_is_not_activated_yet_detailed, moduleName);
@ -68,7 +66,7 @@ public final class NotificationUtil {
.setContentText(content) .setContentText(content)
.setAutoCancel(true) .setAutoCancel(true)
.setSmallIcon(R.drawable.ic_notification) .setSmallIcon(R.drawable.ic_notification)
.setColor(ContextCompat.getColor(context, R.color.color_primary)) .setColor(context.getColor(R.color.color_primary))
.setContentIntent(contentIntent) .setContentIntent(contentIntent)
.setStyle(style); .setStyle(style);

View File

@ -42,7 +42,7 @@
android:key="theme_color" android:key="theme_color"
android:title="@string/theme_color" android:title="@string/theme_color"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<com.takisoft.preferencex.SimpleMenuPreference <rikka.preference.SimpleMenuPreference
android:defaultValue="MODE_NIGHT_FOLLOW_SYSTEM" android:defaultValue="MODE_NIGHT_FOLLOW_SYSTEM"
android:entries="@array/theme_texts" android:entries="@array/theme_texts"
android:entryValues="@array/theme_values" android:entryValues="@array/theme_values"

View File

@ -54,9 +54,8 @@ val zipPathMagiskReleasePath by extra(project(":core").projectDir.path + "/build
allprojects { allprojects {
repositories { repositories {
google() google()
mavenCentral()
jcenter() jcenter()
maven(url = "https://jitpack.io")
maven(url = "https://dl.bintray.com/rikkaw/Libraries")
} }
} }

View File

@ -63,7 +63,7 @@ val verCode: Int by rootProject.extra
val verName: String by rootProject.extra val verName: String by rootProject.extra
dependencies { dependencies {
implementation("rikka.ndk:riru:10") implementation("dev.rikka.ndk:riru:10")
implementation("com.android.tools.build:apksig:4.1.2") implementation("com.android.tools.build:apksig:4.1.2")
implementation(project(":sandhook-hooklib")) implementation(project(":sandhook-hooklib"))
compileOnly(project(":hiddenapi-stubs")) compileOnly(project(":hiddenapi-stubs"))