Refactor deps, fix Play Integrity checker issue (#28)
* Remove unnecessary dependencies, begin to update current dependencies, convert AboutActivity to AboutFragment * Fix the Play Integrity checker not working (it adds Play Store to risky package list too)
This commit is contained in:
parent
7608e170f4
commit
b814768fb2
16 changed files with 51 additions and 90 deletions
|
|
@ -11,7 +11,6 @@ plugins {
|
|||
alias(libs.plugins.refine)
|
||||
alias(libs.plugins.kotlin)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.nav.safeargs.kotlin)
|
||||
alias(libs.plugins.naterialthemebuilder)
|
||||
}
|
||||
|
|
@ -142,17 +141,12 @@ dependencies {
|
|||
implementation(libs.androidx.navigation.ui.ktx)
|
||||
implementation(libs.androidx.preference.ktx)
|
||||
implementation(libs.androidx.swiperefreshlayout)
|
||||
implementation(libs.com.drakeet.multitype)
|
||||
implementation(libs.com.github.bumptech.glide)
|
||||
implementation(libs.com.github.kirich1409.viewbindingpropertydelegate)
|
||||
implementation(libs.com.github.liujingxing.rxhttp)
|
||||
implementation(libs.com.github.liujingxing.rxhttp.converter.serialization)
|
||||
implementation(libs.com.github.topjohnwu.libsu.core)
|
||||
implementation(libs.com.squareup.okhttp3)
|
||||
implementation(libs.dev.rikka.hidden.compat)
|
||||
implementation(libs.me.zhanghai.android.appiconloader)
|
||||
compileOnly(libs.dev.rikka.hidden.stub)
|
||||
ksp(libs.com.github.liujingxing.rxhttp.compiler)
|
||||
|
||||
implementation(libs.androidx.appcompat.appcompat)
|
||||
implementation(libs.material)
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
android:name="icu.nullptr.hidemyapplist.MyApp"
|
||||
android:allowBackup="true"
|
||||
android:fullBackupOnly="true"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity android:name="org.frknkrc44.hma_oss.ui.activity.AboutActivity" />
|
||||
android:theme="@style/AppTheme"
|
||||
tools:targetApi="33">
|
||||
|
||||
<activity
|
||||
android:name="org.frknkrc44.hma_oss.ui.activity.MainActivity"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ package icu.nullptr.hidemyapplist.ui.adapter
|
|||
|
||||
import android.view.ViewGroup
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import icu.nullptr.hidemyapplist.common.Constants.GMS_PACKAGE_NAME
|
||||
import icu.nullptr.hidemyapplist.common.Constants.GSF_PACKAGE_NAME
|
||||
import icu.nullptr.hidemyapplist.common.CommonUtils
|
||||
import icu.nullptr.hidemyapplist.service.ConfigManager
|
||||
import icu.nullptr.hidemyapplist.service.PrefManager
|
||||
import icu.nullptr.hidemyapplist.ui.view.AppItemView
|
||||
|
|
@ -12,12 +11,11 @@ import org.frknkrc44.hma_oss.R
|
|||
class AppManageAdapter(
|
||||
private val onItemClickListener: (String) -> Unit
|
||||
) : AppSelectAdapter() {
|
||||
private val riskyPackages = arrayOf(GMS_PACKAGE_NAME, GSF_PACKAGE_NAME)
|
||||
|
||||
inner class ViewHolder(view: AppItemView) : AppSelectAdapter.ViewHolder(view) {
|
||||
init {
|
||||
view.setOnClickListener {
|
||||
if (!PrefManager.bypassRiskyPackageWarning && riskyPackages.contains(view.binding.packageName.text)) {
|
||||
if (!PrefManager.bypassRiskyPackageWarning && CommonUtils.riskyPackages.contains(view.binding.packageName.text)) {
|
||||
MaterialAlertDialogBuilder(view.context)
|
||||
.setTitle(R.string.app_warning_risky_package_title)
|
||||
.setMessage(R.string.app_warning_risky_package_desc)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import icu.nullptr.hidemyapplist.util.LangList
|
|||
import icu.nullptr.hidemyapplist.util.SuUtils
|
||||
import org.frknkrc44.hma_oss.R
|
||||
import org.frknkrc44.hma_oss.databinding.FragmentSettingsBinding
|
||||
import org.frknkrc44.hma_oss.ui.activity.AboutActivity
|
||||
import java.util.Locale
|
||||
|
||||
class SettingsFragment : Fragment(R.layout.fragment_settings), PreferenceFragmentCompat.OnPreferenceStartFragmentCallback {
|
||||
|
|
@ -44,9 +43,6 @@ class SettingsFragment : Fragment(R.layout.fragment_settings), PreferenceFragmen
|
|||
setupToolbar(
|
||||
toolbar = this,
|
||||
title = getString(R.string.title_settings),
|
||||
onMenuOptionSelected = {
|
||||
startActivity(Intent(requireContext(), AboutActivity::class.java))
|
||||
},
|
||||
navigationIcon = R.drawable.baseline_arrow_back_24,
|
||||
navigationOnClick = { navController.navigateUp() }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package org.frknkrc44.hma_oss.ui.activity
|
|||
|
||||
import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
|
@ -11,32 +10,11 @@ import com.google.android.material.color.DynamicColorsOptions
|
|||
import icu.nullptr.hidemyapplist.hmaApp
|
||||
import icu.nullptr.hidemyapplist.ui.util.ThemeUtils
|
||||
import icu.nullptr.hidemyapplist.util.ConfigUtils.Companion.getLocale
|
||||
import org.frknkrc44.hma_oss.R
|
||||
|
||||
open class BaseActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
overrideActivityTransition(
|
||||
OVERRIDE_TRANSITION_OPEN,
|
||||
R.anim.activity_open_enter,
|
||||
R.anim.fade_out,
|
||||
)
|
||||
|
||||
overrideActivityTransition(
|
||||
OVERRIDE_TRANSITION_CLOSE,
|
||||
R.anim.fade_in,
|
||||
R.anim.activity_close_exit,
|
||||
)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
overridePendingTransition(
|
||||
R.anim.activity_open_enter,
|
||||
R.anim.fade_out,
|
||||
)
|
||||
}
|
||||
|
||||
enableEdgeToEdge()
|
||||
|
||||
DynamicColors.applyToActivityIfAvailable(
|
||||
|
|
@ -48,18 +26,6 @@ open class BaseActivity : AppCompatActivity() {
|
|||
)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
|
||||
if (isFinishing && Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
@Suppress("DEPRECATION")
|
||||
overridePendingTransition(
|
||||
R.anim.fade_in,
|
||||
R.anim.activity_close_exit,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onApplyThemeResource(theme: Resources.Theme, resid: Int, first: Boolean) {
|
||||
super.onApplyThemeResource(theme, resid, first)
|
||||
if (!DynamicColors.isDynamicColorAvailable()) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,157 @@
|
|||
package org.frknkrc44.hma_oss.ui.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.res.ColorStateList
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.WindowInsets
|
||||
import android.widget.LinearLayout
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.net.toUri
|
||||
import androidx.fragment.app.Fragment
|
||||
import by.kirich1409.viewbindingdelegate.viewBinding
|
||||
import com.bumptech.glide.Glide
|
||||
import icu.nullptr.hidemyapplist.ui.util.ThemeUtils.homeItemBackgroundColor
|
||||
import icu.nullptr.hidemyapplist.ui.util.navController
|
||||
import org.frknkrc44.hma_oss.R
|
||||
import org.frknkrc44.hma_oss.common.BuildConfig
|
||||
import org.frknkrc44.hma_oss.databinding.FragmentAboutBinding
|
||||
import org.frknkrc44.hma_oss.databinding.FragmentAboutListItemBinding
|
||||
import org.json.JSONObject
|
||||
|
||||
@Suppress("deprecation")
|
||||
class AboutFragment : Fragment(R.layout.fragment_about) {
|
||||
private val binding by viewBinding<FragmentAboutBinding>()
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.root.setOnApplyWindowInsetsListener { v, insets ->
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
val barInsets = insets.getInsets(WindowInsets.Type.systemBars())
|
||||
binding.root.setPadding(
|
||||
barInsets.left,
|
||||
barInsets.top,
|
||||
barInsets.right,
|
||||
0,
|
||||
)
|
||||
|
||||
binding.bottomPadding.minimumHeight = barInsets.bottom
|
||||
} else {
|
||||
@Suppress("deprecation")
|
||||
binding.root.setPadding(
|
||||
insets.systemWindowInsetLeft,
|
||||
insets.systemWindowInsetTop,
|
||||
insets.systemWindowInsetRight,
|
||||
0,
|
||||
)
|
||||
|
||||
binding.bottomPadding.minimumHeight = insets.systemWindowInsetBottom
|
||||
}
|
||||
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
|
||||
val tint = ColorStateList.valueOf(homeItemBackgroundColor())
|
||||
|
||||
with(binding.aboutHeader) {
|
||||
with(backButton.parent as View) {
|
||||
setOnClickListener { navController.navigateUp() }
|
||||
backgroundTintList = tint
|
||||
}
|
||||
|
||||
Glide.with(this@AboutFragment)
|
||||
.load(R.mipmap.ic_launcher_round)
|
||||
.circleCrop()
|
||||
.into(appIcon)
|
||||
|
||||
appName.setText(R.string.app_name)
|
||||
appVersion.text = BuildConfig.APP_VERSION_NAME
|
||||
|
||||
setOnClickUrl(linkGithub, "https://github.com/frknkrc44/HMA-OSS")
|
||||
setOnClickUrl(linkTelegram, "https://t.me/aerathfuns")
|
||||
|
||||
appInfoTop.backgroundTintList = tint
|
||||
(appName.parent as View).backgroundTintList = tint
|
||||
}
|
||||
|
||||
with(binding.aboutDescription) {
|
||||
contentTitle.setText(R.string.title_about)
|
||||
contentDescription.setText(R.string.about_description)
|
||||
contentDescription.backgroundTintList = tint
|
||||
}
|
||||
|
||||
with(binding.aboutForkDescription) {
|
||||
contentTitle.setText(R.string.title_about_fork)
|
||||
contentDescription.setText(R.string.about_fork_description)
|
||||
contentDescription.backgroundTintList = tint
|
||||
}
|
||||
|
||||
with(binding.listDeveloper) {
|
||||
backgroundTintList = tint
|
||||
clipToOutline = true
|
||||
|
||||
// HMA-OSS devs
|
||||
addDevItem(this, R.drawable.cont_fk, "frknkrc44", "HMA-OSS Developer", "https://github.com/frknkrc44")
|
||||
|
||||
// Original HMA devs
|
||||
addDevItem(this, R.drawable.cont_nullptr, "nullptr", "HMA Developer", "https://github.com/Dr-TSNG")
|
||||
addDevItem(this, R.drawable.cont_k, "Ketal", "HMA Collaborator", "https://github.com/keta1")
|
||||
addDevItem(this, R.drawable.cont_aviraxp, "aviraxp", "HMA Collaborator", "https://github.com/aviraxp")
|
||||
addDevItem(this, R.drawable.cont_icon_designer, "辉少菌", "HMA Icon Designer", "http://www.coolapk.com/u/1560270")
|
||||
addDevItem(this, R.drawable.cont_cpp_master, "LoveSy", "HMA Idea Provider", "https://github.com/yujincheng08")
|
||||
}
|
||||
|
||||
with(binding.listTranslator) {
|
||||
backgroundTintList = tint
|
||||
clipToOutline = true
|
||||
|
||||
val jsonObj = JSONObject(String(requireContext().assets.open("translators.json").readBytes()))
|
||||
val jsonKeys = jsonObj.keys().asSequence().sortedWith { a, b -> a.lowercase().compareTo(b.lowercase()) }
|
||||
for (name in jsonKeys) {
|
||||
val avatarUrl = jsonObj.getString(name)
|
||||
addTranslatorItem(this, avatarUrl, name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun addDevItem(layout: LinearLayout, @DrawableRes avatarResId: Int, name: String, desc: String, url: String) {
|
||||
val newLayout = FragmentAboutListItemBinding.inflate(layoutInflater)
|
||||
setOnClickUrl(newLayout.root, url)
|
||||
|
||||
Glide.with(this)
|
||||
.load(avatarResId)
|
||||
.circleCrop()
|
||||
.into(newLayout.aboutPersonIcon)
|
||||
|
||||
newLayout.text1.text = name
|
||||
newLayout.text2.text = desc
|
||||
layout.addView(newLayout.root)
|
||||
}
|
||||
|
||||
fun addTranslatorItem(layout: LinearLayout, avatarUrl: String, name: String) {
|
||||
val newLayout = FragmentAboutListItemBinding.inflate(layoutInflater)
|
||||
Glide.with(this)
|
||||
.load(avatarUrl)
|
||||
.placeholder(R.drawable.outline_info_24)
|
||||
.circleCrop()
|
||||
.into(newLayout.aboutPersonIcon)
|
||||
|
||||
newLayout.text1.text = name
|
||||
newLayout.text2.visibility = View.GONE
|
||||
layout.addView(newLayout.root)
|
||||
}
|
||||
|
||||
fun setOnClickUrl(view: View, url: String) {
|
||||
view.setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.setData(url.toUri())
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package org.frknkrc44.hma_oss.ui.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.graphics.drawable.LayerDrawable
|
||||
import android.os.Build
|
||||
|
|
@ -29,7 +28,6 @@ import icu.nullptr.hidemyapplist.ui.util.showToast
|
|||
import org.frknkrc44.hma_oss.BuildConfig
|
||||
import org.frknkrc44.hma_oss.R
|
||||
import org.frknkrc44.hma_oss.databinding.FragmentHomeBinding
|
||||
import org.frknkrc44.hma_oss.ui.activity.AboutActivity
|
||||
import java.io.IOException
|
||||
|
||||
/**
|
||||
|
|
@ -292,7 +290,7 @@ class HomeFragment : Fragment(R.layout.fragment_home) {
|
|||
text1.text = getString(R.string.title_about)
|
||||
icon.setImageResource(R.drawable.outline_info_24)
|
||||
root.setOnClickListener {
|
||||
startActivity(Intent(requireContext(), AboutActivity::class.java))
|
||||
navigate(R.id.nav_about)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
80
app/src/main/res/layout/fragment_about.xml
Normal file
80
app/src/main/res/layout/fragment_about.xml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.fragment.AboutFragment">
|
||||
|
||||
<include
|
||||
android:id="@+id/about_header"
|
||||
layout="@layout/fragment_about_header" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_marginTop="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/about_fork_description"
|
||||
layout="@layout/fragment_about_text_section" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="16dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/about_description"
|
||||
layout="@layout/fragment_about_text_section" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginVertical="16dp"
|
||||
android:text="@string/about_developer"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?colorPrimary"
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/list_developer"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/about_content_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginVertical="16dp"
|
||||
android:text="@string/about_translator"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?colorPrimary"
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/list_translator"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/about_content_bg"
|
||||
android:layout_marginBottom="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/bottom_padding"
|
||||
android:minHeight="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
114
app/src/main/res/layout/fragment_about_header.xml
Normal file
114
app/src/main/res/layout/fragment_about_header.xml
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="96dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="96dp">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/app_info_top"
|
||||
android:background="@drawable/about_header_bg_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_centerInParent="true"
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
app:cardCornerRadius="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/back_button"
|
||||
android:src="@drawable/baseline_arrow_back_24"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="8dp"
|
||||
android:tint="?attr/colorOnBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:background="@drawable/about_header_bg_bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/app_name"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/app_version"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.google.android.material.button.MaterialButtonGroup
|
||||
style="@style/Widget.Material3.MaterialButtonGroup.Connected"
|
||||
android:layout_marginTop="@dimen/item_padding_vertical"
|
||||
android:id="@+id/link_buttons"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/link_github"
|
||||
android:text="GitHub"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/link_telegram"
|
||||
android:text="Telegram"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.google.android.material.button.MaterialButtonGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
38
app/src/main/res/layout/fragment_about_list_item.xml
Normal file
38
app/src/main/res/layout/fragment_about_list_item.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/about_person_icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
<LinearLayout
|
||||
android:paddingStart="@dimen/item_padding_vertical"
|
||||
android:paddingEnd="@dimen/item_padding_vertical"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?listPreferredItemHeightLarge">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text2"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
24
app/src/main/res/layout/fragment_about_text_section.xml
Normal file
24
app/src/main/res/layout/fragment_about_text_section.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/content_title"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?colorPrimary"
|
||||
android:paddingHorizontal="@dimen/item_padding_vertical"
|
||||
android:layout_marginBottom="@dimen/item_padding_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/content_description"
|
||||
android:background="@drawable/about_content_bg"
|
||||
android:padding="@dimen/item_padding_vertical"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -18,6 +18,11 @@
|
|||
android:name="icu.nullptr.hidemyapplist.ui.fragment.SettingsFragment"
|
||||
android:label="@string/title_settings" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_about"
|
||||
android:name="org.frknkrc44.hma_oss.ui.fragment.AboutFragment"
|
||||
android:label="@string/title_about" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_template_manage"
|
||||
android:name="icu.nullptr.hidemyapplist.ui.fragment.TemplateManageFragment"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
package icu.nullptr.hidemyapplist.common
|
||||
|
||||
import android.os.SystemProperties
|
||||
import icu.nullptr.hidemyapplist.common.Constants.GMS_PACKAGE_NAME
|
||||
import icu.nullptr.hidemyapplist.common.Constants.GSF_PACKAGE_NAME
|
||||
import icu.nullptr.hidemyapplist.common.Constants.VENDING_PACKAGE_NAME
|
||||
|
||||
object CommonUtils {
|
||||
val gmsPackages = arrayOf(GMS_PACKAGE_NAME, GSF_PACKAGE_NAME, VENDING_PACKAGE_NAME)
|
||||
val riskyPackages = arrayOf<String>() + gmsPackages
|
||||
|
||||
val isAppDataIsolationEnabled: Boolean
|
||||
get() = SystemProperties.getBoolean(Constants.ANDROID_APP_DATA_ISOLATION_ENABLED_PROPERTY, true)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package icu.nullptr.hidemyapplist.common
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.frknkrc44.hma_oss.common.BuildConfig
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
[versions]
|
||||
agp = "8.13.0"
|
||||
kotlin = "2.1.10"
|
||||
material = "1.13.0-rc01"
|
||||
rxhttp = "3.3.1"
|
||||
hidden-api = "4.3.3"
|
||||
kotlin = "2.2.20"
|
||||
material = "1.13.0"
|
||||
hidden-api = "4.4.0"
|
||||
|
||||
[plugins]
|
||||
agp-app = { id = "com.android.application", version.ref = "agp" }
|
||||
agp-lib = { id = "com.android.library", version.ref = "agp" }
|
||||
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version = "2.1.10-1.0.31" }
|
||||
nav-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version = "2.8.8" }
|
||||
nav-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version = "2.9.5" }
|
||||
autoresconfig = { id = "dev.rikka.tools.autoresconfig", version = "1.2.2" }
|
||||
refine = { id = "dev.rikka.tools.refine", version = "4.4.0" }
|
||||
naterialthemebuilder = { id = "dev.rikka.tools.materialthemebuilder", version = "1.5.1" }
|
||||
|
|
@ -19,22 +17,18 @@ naterialthemebuilder = { id = "dev.rikka.tools.materialthemebuilder", version =
|
|||
[libraries]
|
||||
androidx-appcompat-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.7.1" }
|
||||
androidx-annotation-jvm = { group = "androidx.annotation", name = "annotation-jvm", version = "1.9.1" }
|
||||
androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version = "2.8.8" }
|
||||
androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version = "2.8.8" }
|
||||
androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version = "2.9.5" }
|
||||
androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version = "2.9.5" }
|
||||
androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version = "1.2.1" }
|
||||
androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version = "1.1.0" }
|
||||
com-drakeet-multitype = { module = "com.drakeet.multitype:multitype", version = "4.3.0" }
|
||||
com-github-bumptech-glide = { module = "com.github.bumptech.glide:glide", version = "5.0.5" }
|
||||
com-github-kirich1409-viewbindingpropertydelegate = { module = "com.github.kirich1409:viewbindingpropertydelegate", version = "1.5.9" }
|
||||
#noinspection NewerVersionAvailable
|
||||
com-github-kyuubiran-ezxhelper = { module = "com.github.kyuubiran:EzXHelper", version = "1.0.3" }
|
||||
com-github-liujingxing-rxhttp = { module = "com.github.liujingxing.rxhttp:rxhttp", version.ref = "rxhttp" }
|
||||
com-github-liujingxing-rxhttp-compiler = { module = "com.github.liujingxing.rxhttp:rxhttp-compiler", version.ref = "rxhttp" }
|
||||
com-github-liujingxing-rxhttp-converter-serialization = { module = "com.github.liujingxing.rxhttp:converter-serialization", version.ref = "rxhttp" }
|
||||
com-github-topjohnwu-libsu-core = { module = "com.github.topjohnwu.libsu:core", version = "6.0.0" }
|
||||
com-squareup-okhttp3 = { module = "com.squareup.okhttp3:okhttp", version = "4.12.0" }
|
||||
de-robv-android-xposed-api = { module = "de.robv.android.xposed:api", version = "82" }
|
||||
dev-rikka-hidden-compat = { module = "dev.rikka.hidden:compat", version.ref = "hidden-api" }
|
||||
dev-rikka-hidden-stub = { module = "dev.rikka.hidden:stub", version.ref = "hidden-api" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.7.3" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.9.0" }
|
||||
material = { module = "com.google.android.material:material", version.ref = "material" }
|
||||
me-zhanghai-android-appiconloader = { module = "me.zhanghai.android.appiconloader:appiconloader", version = "1.5.0" }
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.content.pm.IPackageManager
|
|||
import android.os.Build
|
||||
import android.os.UserHandle
|
||||
import icu.nullptr.hidemyapplist.common.AppPresets
|
||||
import icu.nullptr.hidemyapplist.common.CommonUtils
|
||||
import icu.nullptr.hidemyapplist.common.Constants
|
||||
import icu.nullptr.hidemyapplist.common.IHMAService
|
||||
import icu.nullptr.hidemyapplist.common.JsonConfig
|
||||
|
|
@ -176,7 +177,7 @@ class HMAService(val pms: IPackageManager) : IHMAService.Stub() {
|
|||
}
|
||||
|
||||
fun isAppInGMSIgnoredPackages(caller: String, query: String) =
|
||||
(caller == Constants.GMS_PACKAGE_NAME || caller == Constants.GSF_PACKAGE_NAME) && appHasGMSConnection(query)
|
||||
(caller in CommonUtils.gmsPackages) && appHasGMSConnection(query)
|
||||
|
||||
fun shouldHide(caller: String?, query: String?): Boolean {
|
||||
if (caller == null || query == null) return false
|
||||
|
|
|
|||
Loading…
Reference in a new issue