Skip to content

Commit

Permalink
优化体积
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Feb 28, 2023
1 parent b43f535 commit 7f244c3
Show file tree
Hide file tree
Showing 32 changed files with 69 additions and 267 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ android {
applicationId "com.chrxw.purenga"
minSdk 24
targetSdk 33
versionCode 3
versionName "1.1.0"
versionCode 4
versionName "1.2.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
proguardFiles
}

buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -38,8 +39,8 @@ dependencies {
compileOnly 'de.robv.android.xposed:api:82'

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name">
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/java/com/chrxw/purenga/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.chrxw.purenga

import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
Expand Down Expand Up @@ -50,6 +48,12 @@ class MainActivity : AppCompatActivity() {
Uri.parse(getString(R.string.author_url))
)
}
"donate" -> {
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.donate_url))
)
}
"reopen_nga" -> {
Intent(Intent.ACTION_MAIN)
.setComponent(
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/chrxw/purenga/hook/BaseHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ package com.chrxw.purenga.hook
*/
abstract class BaseHook(val mClassLoader: ClassLoader) {
abstract fun startHook()
open fun lateInitHook() {}
}
30 changes: 0 additions & 30 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

27 changes: 27 additions & 0 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#241F1F">
<group android:scaleX="0.4872"
android:scaleY="0.4872"
android:translateX="6.1536"
android:translateY="6.1536">
<path
android:fillColor="@android:color/white"
android:pathData="M4.5,9.5m-2.5,0a2.5,2.5 0,1 1,5 0a2.5,2.5 0,1 1,-5 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M9,5.5m-2.5,0a2.5,2.5 0,1 1,5 0a2.5,2.5 0,1 1,-5 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M15,5.5m-2.5,0a2.5,2.5 0,1 1,5 0a2.5,2.5 0,1 1,-5 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M19.5,9.5m-2.5,0a2.5,2.5 0,1 1,5 0a2.5,2.5 0,1 1,-5 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M17.34,14.86c-0.87,-1.02 -1.6,-1.89 -2.48,-2.91 -0.46,-0.54 -1.05,-1.08 -1.75,-1.32 -0.11,-0.04 -0.22,-0.07 -0.33,-0.09 -0.25,-0.04 -0.52,-0.04 -0.78,-0.04s-0.53,0 -0.79,0.05c-0.11,0.02 -0.22,0.05 -0.33,0.09 -0.7,0.24 -1.28,0.78 -1.75,1.32 -0.87,1.02 -1.6,1.89 -2.48,2.91 -1.31,1.31 -2.92,2.76 -2.62,4.79 0.29,1.02 1.02,2.03 2.33,2.32 0.73,0.15 3.06,-0.44 5.54,-0.44h0.18c2.48,0 4.81,0.58 5.54,0.44 1.31,-0.29 2.04,-1.31 2.33,-2.32 0.31,-2.04 -1.3,-3.49 -2.61,-4.8z"/>
</group>
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
6 changes: 0 additions & 6 deletions app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
16 changes: 0 additions & 16 deletions app/src/main/res/values-night/themes.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/values/colors.xml

This file was deleted.

4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#F9F2D5</color>
</resources>
9 changes: 7 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
<string name="app_name">NGA净化</string>
<string name="app_desc">干掉NGA开屏广告</string>
<string name="block_splash_ad">屏蔽开屏广告</string>
<string name="block_pool_ad">屏蔽信息流广告</string>
<string name="block_splash_ad_summary">去你妈的开屏广告</string>
<string name="crack_ad_task">去广告任务破解</string>
<string name="crack_ad_task_summary">秒关广告不影响结算</string>
<string name="running_status">运行状态</string>
<string name="about">关于</string>
<string name="version">版本</string>
<string name="author">作者</string>
<string name="donate">捐赠</string>
<string name="other">其他</string>
<string name="reopen_nga">打开NGA</string>
<string name="module_enabled">模块已启用</string>
<string name="module_disabled">模块未启用</string>
<string name="github_url">https://github.com/chr233/PureNGA</string>
<string name="author_url">https://github.com/chr233</string>
<string name="author_list">chr233</string>
<string name="donate_url">https://afdian.net/a/chr233</string>
<string name="author_summary">chr233</string>
<string name="donate_summary">爱发电</string>
</resources>
Loading

0 comments on commit 7f244c3

Please sign in to comment.