Skip to content

Commit cb05720

Browse files
committed
release: v2.0.0
Signed-off-by: lennoard <lennoardrai@gmail.com>
1 parent 367f34e commit cb05720

10 files changed

Lines changed: 186 additions & 10 deletions

File tree

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.jetbrains.kotlin.config.KotlinCompilerVersion
22
import java.util.Properties
33

4-
val devCycle = true
4+
val devCycle = false
55

66
plugins {
77
id("com.android.application")
@@ -39,8 +39,8 @@ android {
3939
applicationId = "com.androidvip.sysctlgui"
4040
minSdk = 21
4141
targetSdk = 32
42-
versionCode = 10
43-
versionName = "1.1.0"
42+
versionCode = 11
43+
versionName = "2.0.0"
4444
vectorDrawables.useSupportLibrary = true
4545
resourceConfigurations.addAll(listOf("en", "de", "pt-rBR"))
4646
javaCompileOptions {

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
android:label="@string/manage_parameters"
3535
android:theme="@style/AppTheme" />
3636
<activity
37-
android:name=".ui.StartActivity"
37+
android:name=".ui.start.StartActivity"
3838
android:exported="true"
3939
android:theme="@style/AppTheme.Starting">
4040
<intent-filter>
@@ -47,6 +47,9 @@
4747
android:name="android.app.shortcuts"
4848
android:resource="@xml/shortcuts" />
4949
</activity>
50+
<activity
51+
android:name=".ui.start.StartErrorActivity"
52+
android:theme="@style/AppTheme" />
5053
<activity
5154
android:name=".ui.tasker.TaskerPluginActivity"
5255
android:exported="true"

app/src/main/kotlin/com/androidvip/sysctlgui/services/tiles/StartAppTileService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import android.os.Build
55
import android.service.quicksettings.Tile
66
import android.service.quicksettings.TileService
77
import androidx.annotation.RequiresApi
8-
import com.androidvip.sysctlgui.ui.StartActivity
8+
import com.androidvip.sysctlgui.ui.start.StartActivity
99

1010
@RequiresApi(Build.VERSION_CODES.N)
1111
class StartAppTileService : TileService() {

app/src/main/kotlin/com/androidvip/sysctlgui/ui/StartActivity.kt renamed to app/src/main/kotlin/com/androidvip/sysctlgui/ui/start/StartActivity.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
package com.androidvip.sysctlgui.ui
1+
package com.androidvip.sysctlgui.ui.start
22

33
import android.content.Intent
4+
import android.os.Build
45
import android.os.Bundle
56
import android.widget.Toast
67
import androidx.appcompat.app.AppCompatActivity
@@ -59,6 +60,11 @@ class StartActivity : AppCompatActivity() {
5960
} else {
6061
binding.splashProgress.goAway()
6162
toast(R.string.root_not_found_sum, Toast.LENGTH_LONG)
63+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
64+
startActivity(
65+
Intent(this@StartActivity, StartErrorActivity::class.java)
66+
)
67+
}
6268
finish()
6369
}
6470
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.androidvip.sysctlgui.ui.start
2+
3+
import android.content.Intent
4+
import android.graphics.drawable.AnimatedVectorDrawable
5+
import android.os.Bundle
6+
import android.os.Handler
7+
import androidx.appcompat.app.AppCompatActivity
8+
import androidx.core.content.ContextCompat
9+
import com.androidvip.sysctlgui.R
10+
import com.androidvip.sysctlgui.databinding.ActivityStartErrorBinding
11+
12+
class StartErrorActivity : AppCompatActivity() {
13+
private lateinit var binding: ActivityStartErrorBinding
14+
15+
override fun onCreate(savedInstanceState: Bundle?) {
16+
super.onCreate(savedInstanceState)
17+
binding = ActivityStartErrorBinding.inflate(layoutInflater)
18+
setContentView(binding.root)
19+
20+
val avd = ContextCompat.getDrawable(this, R.drawable.avd_no_root)
21+
if (avd is AnimatedVectorDrawable) {
22+
val handler = Handler(mainLooper)
23+
val runnable = object : Runnable {
24+
override fun run() {
25+
if (!isFinishing) {
26+
avd.start()
27+
}
28+
handler.postDelayed(this, DELAY)
29+
}
30+
}
31+
handler.postDelayed(runnable, DELAY)
32+
binding.animation.setImageDrawable(avd)
33+
avd.start()
34+
}
35+
36+
binding.tryAgain.setOnClickListener {
37+
startActivity(Intent(this, StartActivity::class.java))
38+
finish()
39+
}
40+
}
41+
42+
companion object {
43+
private const val DELAY = 3000L
44+
}
45+
}

app/src/main/kotlin/com/androidvip/sysctlgui/widgets/FavoritesWidget.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.androidvip.sysctlgui.R
1313
import com.androidvip.sysctlgui.data.mapper.DomainParamMapper
1414
import com.androidvip.sysctlgui.domain.usecase.GetUserParamsUseCase
1515
import com.androidvip.sysctlgui.helpers.Actions
16-
import com.androidvip.sysctlgui.ui.StartActivity
16+
import com.androidvip.sysctlgui.ui.start.StartActivity
1717
import com.androidvip.sysctlgui.ui.params.user.RemovableParamAdapter
1818
import com.androidvip.sysctlgui.widgets.FavoritesWidget.Companion.EDIT_PARAM_EXTRA
1919
import kotlinx.coroutines.runBlocking
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<animated-vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:aapt="http://schemas.android.com/aapt">
4+
<aapt:attr name="android:drawable">
5+
<vector
6+
android:name="vector"
7+
android:width="128dp"
8+
android:height="128dp"
9+
android:viewportWidth="24"
10+
android:viewportHeight="24">
11+
<group
12+
android:name="group"
13+
android:pivotX="12"
14+
android:pivotY="12">
15+
<path
16+
android:name="root"
17+
android:pathData="M 19 19 L 5 19 L 5 5 L 19 5 M 19 3 L 5 3 C 4.47 3 3.961 3.211 3.586 3.586 C 3.211 3.961 3 4.47 3 5 L 3 19 C 3 19.53 3.211 20.039 3.586 20.414 C 3.961 20.789 4.47 21 5 21 L 19 21 C 19.53 21 20.039 20.789 20.414 20.414 C 20.789 20.039 21 19.53 21 19 L 21 5 C 21 4.47 20.789 3.961 20.414 3.586 C 20.039 3.211 19.53 3 19 3 M 7 9 L 9.31 9 L 9.63 6 L 11.63 6 L 11.31 9 L 13.31 9 L 13.63 6 L 15.63 6 L 15.31 9 L 17 9 L 17 11 L 15.1 11 L 14.9 13 L 17 13 L 17 15 L 14.69 15 L 14.37 18 L 12.37 18 L 12.69 15 L 10.69 15 L 10.37 18 L 8.37 18 L 8.69 15 L 7 15 L 7 13 L 8.9 13 L 9.1 11 L 7 11 L 7 9 M 11.1 11 L 10.9 13 L 12.9 13 L 13.1 11 Z"
18+
android:fillColor="?colorOnBackground"/>
19+
</group>
20+
</vector>
21+
</aapt:attr>
22+
<target android:name="root">
23+
<aapt:attr name="android:animation">
24+
<set>
25+
<objectAnimator
26+
android:propertyName="pathData"
27+
android:duration="1000"
28+
android:valueFrom="M 19 19 L 5 19 L 5 5 L 19 5 M 19 3 L 5 3 C 4.47 3 3.961 3.211 3.586 3.586 C 3.211 3.961 3 4.47 3 5 L 3 19 C 3 19.53 3.211 20.039 3.586 20.414 C 3.961 20.789 4.47 21 5 21 L 19 21 C 19.53 21 20.039 20.789 20.414 20.414 C 20.789 20.039 21 19.53 21 19 L 21 5 C 21 4.47 20.789 3.961 20.414 3.586 C 20.039 3.211 19.53 3 19 3 M 13.31 9 L 11.31 9 L 11.63 6 L 9.63 6 L 9.31 9 L 7 9 L 7 11 L 9.1 11 L 8.9 13 L 7 13 L 7 15 L 8.69 15 L 8.37 18 L 10.37 18 L 10.69 15 L 12.69 15 L 12.37 18 L 14.37 18 L 14.69 15 L 17 15 L 17 13 L 14.9 13 L 15.1 11 L 17 11 L 17 9 L 15.31 9 L 15.63 6 L 13.63 6 L 13.31 9 M 13.1 11 L 12.9 13 L 10.9 13 L 11.1 11 L 13.1 11"
29+
android:valueTo="M 19 19 L 5 19 L 5 5 L 19 5 M 19 3 L 5 3 C 4.47 3 3.961 3.211 3.586 3.586 C 3.211 3.961 3 4.47 3 5 L 3 19 C 3 19.53 3.211 20.039 3.586 20.414 C 3.961 20.789 4.47 21 5 21 L 19 21 C 19.53 21 20.039 20.789 20.414 20.414 C 20.789 20.039 21 19.53 21 19 L 21 5 C 21 4.445 20.775 3.945 20.413 3.584 C 20.05 3.223 19.55 3 19 3 M 11 15 L 11 17 L 11.08 17 L 11.16 17 L 11.24 17 L 11.32 17 L 11.4 17 L 11.48 17 L 11.56 17 L 11.64 17 L 11.72 17 L 11.8 17 L 11.88 17 L 11.96 17 L 12.04 17 L 12.12 17 L 12.2 17 L 12.28 17 L 12.36 17 L 12.44 17 L 12.52 17 L 12.6 17 L 12.68 17 L 12.76 17 L 12.84 17 L 12.92 17 L 13 17 L 13 15 L 11 15 M 11 7 L 11 13 L 13 13 L 13 7 L 11 7"
30+
android:valueType="pathType"
31+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
32+
<objectAnimator
33+
android:propertyName="fillColor"
34+
android:startOffset="298"
35+
android:duration="307"
36+
android:valueFrom="?colorOnBackground"
37+
android:valueTo="?colorError"
38+
android:valueType="colorType"
39+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
40+
<objectAnimator
41+
android:propertyName="pathData"
42+
android:startOffset="1999"
43+
android:duration="1001"
44+
android:valueFrom="M 19 19 L 5 19 L 5 5 L 19 5 M 19 3 L 5 3 C 4.47 3 3.961 3.211 3.586 3.586 C 3.211 3.961 3 4.47 3 5 L 3 19 C 3 19.53 3.211 20.039 3.586 20.414 C 3.961 20.789 4.47 21 5 21 L 19 21 C 19.53 21 20.039 20.789 20.414 20.414 C 20.789 20.039 21 19.53 21 19 L 21 5 C 21 4.445 20.775 3.945 20.413 3.584 C 20.05 3.223 19.55 3 19 3 M 11 15 L 11 17 L 11.08 17 L 11.16 17 L 11.24 17 L 11.32 17 L 11.4 17 L 11.48 17 L 11.56 17 L 11.64 17 L 11.72 17 L 11.8 17 L 11.88 17 L 11.96 17 L 12.04 17 L 12.12 17 L 12.2 17 L 12.28 17 L 12.36 17 L 12.44 17 L 12.52 17 L 12.6 17 L 12.68 17 L 12.76 17 L 12.84 17 L 12.92 17 L 13 17 L 13 15 L 11 15 M 11 7 L 11 13 L 13 13 L 13 7 L 11 7"
45+
android:valueTo="M 19 19 L 5 19 L 5 5 L 19 5 M 19 3 L 5 3 C 4.47 3 3.961 3.211 3.586 3.586 C 3.211 3.961 3 4.47 3 5 L 3 19 C 3 19.53 3.211 20.039 3.586 20.414 C 3.961 20.789 4.47 21 5 21 L 19 21 C 19.53 21 20.039 20.789 20.414 20.414 C 20.789 20.039 21 19.53 21 19 L 21 5 C 21 4.47 20.789 3.961 20.414 3.586 C 20.039 3.211 19.53 3 19 3 M 13.31 9 L 11.31 9 L 11.63 6 L 9.63 6 L 9.31 9 L 7 9 L 7 11 L 9.1 11 L 8.9 13 L 7 13 L 7 15 L 8.69 15 L 8.37 18 L 10.37 18 L 10.69 15 L 12.69 15 L 12.37 18 L 14.37 18 L 14.69 15 L 17 15 L 17 13 L 14.9 13 L 15.1 11 L 17 11 L 17 9 L 15.31 9 L 15.63 6 L 13.63 6 L 13.31 9 M 13.1 11 L 12.9 13 L 10.9 13 L 11.1 11 L 13.1 11"
46+
android:valueType="pathType"
47+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
48+
<objectAnimator
49+
android:propertyName="fillColor"
50+
android:startOffset="2300"
51+
android:duration="307"
52+
android:valueFrom="?colorError"
53+
android:valueTo="?colorOnBackground"
54+
android:valueType="colorType"
55+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
56+
</set>
57+
</aapt:attr>
58+
</target>
59+
<target android:name="group">
60+
<aapt:attr name="android:animation">
61+
<set>
62+
<objectAnimator
63+
android:propertyName="rotation"
64+
android:duration="1000"
65+
android:valueFrom="0"
66+
android:valueTo="360"
67+
android:valueType="floatType"
68+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
69+
<objectAnimator
70+
android:propertyName="rotation"
71+
android:startOffset="1803"
72+
android:duration="1176"
73+
android:valueFrom="360"
74+
android:valueTo="720"
75+
android:valueType="floatType"
76+
android:interpolator="@android:interpolator/fast_out_slow_in"/>
77+
</set>
78+
</aapt:attr>
79+
</target>
80+
</animated-vector>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:fitsSystemWindows="false"
7+
android:gravity="center_horizontal"
8+
android:orientation="vertical"
9+
android:padding="@dimen/d24">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="match_parent"
14+
android:gravity="center"
15+
android:orientation="vertical">
16+
17+
<androidx.appcompat.widget.AppCompatImageView
18+
android:id="@+id/animation"
19+
android:layout_width="wrap_content"
20+
android:layout_height="wrap_content"
21+
app:srcCompat="@drawable/avd_no_root" />
22+
23+
<com.google.android.material.textview.MaterialTextView
24+
android:layout_width="match_parent"
25+
android:layout_height="wrap_content"
26+
android:layout_marginTop="@dimen/d48"
27+
android:gravity="center"
28+
android:text="@string/root_not_found_sum"
29+
android:textAppearance="?textAppearanceBody1" />
30+
31+
<com.google.android.material.button.MaterialButton
32+
android:id="@+id/tryAgain"
33+
style="@style/Widget.Material3.Button.ElevatedButton"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_marginTop="@dimen/d24"
37+
android:text="@string/try_again" />
38+
39+
</LinearLayout>
40+
41+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@
103103
<string name="browse">Browse</string>
104104
<string name="export">Export</string>
105105
<string name="param_list">Param list</string>
106+
<string name="try_again">Try again</string>
106107
</resources>

app/src/main/res/xml/shortcuts.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<intent
1212
android:action="BrowseParams"
1313
android:targetPackage="com.androidvip.sysctlgui"
14-
android:targetClass="com.androidvip.sysctlgui.ui.StartActivity" />
14+
android:targetClass="com.androidvip.sysctlgui.ui.start.StartActivity" />
1515
<categories android:name="android.shortcut.conversation" />
1616
</shortcut>
1717

@@ -25,7 +25,7 @@
2525
<intent
2626
android:action="ExportParams"
2727
android:targetPackage="com.androidvip.sysctlgui"
28-
android:targetClass="com.androidvip.sysctlgui.ui.StartActivity" />
28+
android:targetClass="com.androidvip.sysctlgui.ui.start.StartActivity" />
2929
<categories android:name="android.shortcut.conversation" />
3030
</shortcut>
3131

@@ -39,7 +39,7 @@
3939
<intent
4040
android:action="OpenSettings"
4141
android:targetPackage="com.androidvip.sysctlgui"
42-
android:targetClass="com.androidvip.sysctlgui.ui.StartActivity" />
42+
android:targetClass="com.androidvip.sysctlgui.ui.start.StartActivity" />
4343
<categories android:name="android.shortcut.conversation" />
4444
</shortcut>
4545
</shortcuts>

0 commit comments

Comments
 (0)