Skip to content

Commit

Permalink
Merge pull request #612 from KieronQuinn/release/1.6.2
Browse files Browse the repository at this point in the history
1.6.2
  • Loading branch information
KieronQuinn authored Oct 26, 2024
2 parents 8180c92 + 4fdf2ca commit 56f8c83
Show file tree
Hide file tree
Showing 142 changed files with 1,120 additions and 717 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 31 additions & 32 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,22 @@ plugins {
id 'androidx.navigation.safeargs'
id 'dev.rikka.tools.refine'
id 'com.google.android.gms.oss-licenses-plugin'
id 'com.google.devtools.ksp'
}

//Permission for Columbus to use
rootProject.ext.set("columbusPermission", "com.google.android.columbus.taptap.permission.CONFIGURE_COLUMBUS_GESTURE")

def tagName = '1.6.1'
def tagVersion = 1610
def tagName = '1.6.2'
def tagVersion = 1620

android {
compileSdk 34

//aidl is broken on 33...
buildToolsVersion "32.0.0"
compileSdk 35

defaultConfig {
applicationId "com.kieronquinn.app.taptap"
minSdk 24
targetSdk 33
targetSdk 35
versionCode tagVersion
versionName tagName

Expand Down Expand Up @@ -55,6 +53,7 @@ android {
jvmTarget = '17'
}
buildFeatures {
buildConfig true
viewBinding true
aidl true
}
Expand All @@ -67,38 +66,38 @@ android {
dependencies {

//AndroidX
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.work:work-runtime-ktx:2.8.1"
implementation "androidx.core:core-ktx:1.10.1"
implementation "androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01"
implementation "androidx.work:work-runtime-ktx:2.9.1"
implementation "androidx.core:core-ktx:1.13.1"
implementation "androidx.vectordrawable:vectordrawable-seekable:1.0.0"
implementation "androidx.core:core-splashscreen:1.0.1"
implementation "androidx.fragment:fragment-ktx:1.5.7"
implementation "androidx.activity:activity-ktx:1.7.2"
implementation "androidx.fragment:fragment-ktx:1.8.4"
implementation "androidx.activity:activity-ktx:1.9.3"

//Lifecycle
def lifecycleVersion = '2.6.1'
def lifecycleVersion = '2.8.6'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"

//Desugaring to allow Java Date on older Android versions
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'

//OSS licences screen
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'
implementation 'com.google.android.gms:play-services-oss-licenses:17.1.0'

//Room
def room_version = "2.5.1"
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
ksp "androidx.room:room-compiler:$room_version"

//MD3
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.12.0'

//MonetCompat for Monet backwards compatibility
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
Expand All @@ -107,17 +106,17 @@ dependencies {
implementation "androidx.palette:palette-ktx:1.0.0"

//Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1'

//Koin
implementation "io.insert-koin:koin-android:3.4.0"
implementation "io.insert-koin:koin-android:3.5.6"

//Retrofit for updates + device spec query (opt-in)
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.retrofit2:retrofit:2.11.0"
implementation "com.squareup.retrofit2:converter-gson:2.11.0"

//Gson for serialization
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.google.code.gson:gson:2.11.0'

//Columbus module is separate to make it easier to work with
implementation project(path: ':columbus')
Expand All @@ -138,12 +137,12 @@ dependencies {
implementation 'com.joaomgcd:taskerpluginlibrary:0.4.2'

//Shizuku + libsu for shell/root services
def shizuku_version = '12.1.0'
def shizuku_version = '13.1.5'
implementation "dev.rikka.shizuku:api:$shizuku_version"
implementation "dev.rikka.shizuku:provider:$shizuku_version"
implementation "dev.rikka.tools.refine:runtime:$refine_version"

def libsuVersion = '5.0.3'
def libsuVersion = '5.2.2'
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
implementation "com.github.topjohnwu.libsu:service:${libsuVersion}"

Expand All @@ -160,14 +159,14 @@ dependencies {
implementation "io.noties.markwon:core:4.6.2"

//Lottie for animations
implementation 'com.airbnb.android:lottie:5.2.0'
implementation 'com.airbnb.android:lottie:6.4.1'

//Process Phoenix to fully restart the app when needed
implementation 'com.jakewharton:process-phoenix:2.1.2'
implementation 'com.jakewharton:process-phoenix:3.0.0'

//Test
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

}
Binary file added app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file added app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
23 changes: 20 additions & 3 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1600,
"versionName": "1.6",
"versionCode": 1620,
"versionName": "1.6.2",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/app-release.dm"
]
}
],
"minSdkVersionForDexing": 24
}
10 changes: 7 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,26 @@
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"
tools:ignore="HighSamplingRate" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>

<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>

<application
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:name=".TapTap"
android:enableOnBackInvokedCallback="true"
android:extractNativeLibs="true"
android:theme="@style/Theme.TapTap.Splash">
android:theme="@style/Theme.TapTap.Splash"
tools:targetApi="tiramisu">

<activity
android:name=".ui.activities.MainActivity"
android:screenOrientation="portrait"
android:launchMode="singleInstance"
android:exported="true">
<intent-filter>
Expand Down Expand Up @@ -73,7 +76,8 @@
android:process=":crashreporting"
android:excludeFromRecents="true"/>

<service android:name=".service.foreground.TapTapForegroundService"/>
<service android:name=".service.foreground.TapTapForegroundService"
android:foregroundServiceType="specialUse"/>

<receiver android:name=".receivers.TapTapServiceStartReceiver"
android:exported="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package com.kieronquinn.app.taptap.components.accessibility

import android.content.Intent
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import com.kieronquinn.app.taptap.ui.activities.MainActivity
import com.kieronquinn.app.taptap.utils.extensions.whenCreated
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.collect

interface TapTapAccessibilityRouter {

Expand Down Expand Up @@ -40,15 +39,15 @@ interface TapTapAccessibilityRouter {
suspend fun onGestureAccessibilityStarted()

fun bringToFrontOnAccessibilityStart(fragment: Fragment) {
fragment.viewLifecycleOwner.lifecycleScope.launchWhenCreated {
fragment.viewLifecycleOwner.whenCreated {
this@TapTapAccessibilityRouter.accessibilityStartBus.collect {
fragment.bringToFront()
}
}
}

fun bringToFrontOnGestureAccessibilityStart(fragment: Fragment) {
fragment.viewLifecycleOwner.lifecycleScope.launchWhenCreated {
fragment.viewLifecycleOwner.whenCreated {
this@TapTapAccessibilityRouter.gestureAccessibilityStartBus.collect {
fragment.bringToFront()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.annotation.StringRes
import androidx.core.app.NotificationCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import com.google.android.columbus.actions.Action
import com.google.android.columbus.feedback.FeedbackEffect
import com.google.android.columbus.gates.Gate
Expand All @@ -26,6 +25,7 @@ import com.kieronquinn.app.taptap.service.accessibility.TapTapGestureAccessibili
import com.kieronquinn.app.taptap.utils.extensions.getAccessibilityIntent
import com.kieronquinn.app.taptap.utils.extensions.isServiceRunning
import com.kieronquinn.app.taptap.utils.extensions.runOnDestroy
import com.kieronquinn.app.taptap.utils.extensions.whenCreated
import com.kieronquinn.app.taptap.utils.notifications.TapTapNotificationChannel
import com.kieronquinn.app.taptap.utils.notifications.TapTapNotificationId
import com.kieronquinn.app.taptap.utils.notifications.TapTapNotificationIntentId
Expand Down Expand Up @@ -86,7 +86,7 @@ abstract class TapTapAction(
}

private fun handleTrigger(detectionProperties: GestureSensor.DetectionProperties, isTripleTap: Boolean) {
lifecycleScope.launchWhenCreated {
lifecycle.whenCreated {
onTriggered(detectionProperties, isTripleTap)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.telecom.TelecomManager
import android.telephony.PhoneStateListener
import android.telephony.TelephonyManager
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import com.google.android.columbus.feedback.FeedbackEffect
import com.google.android.columbus.sensors.GestureSensor
import com.kieronquinn.app.taptap.components.columbus.actions.TapTapAction
import com.kieronquinn.app.taptap.components.columbus.gates.TapTapGate
import com.kieronquinn.app.taptap.components.columbus.gates.TapTapWhenGate
import com.kieronquinn.app.taptap.utils.extensions.doesHavePermissions
import com.kieronquinn.app.taptap.utils.extensions.onCallStateChanged
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.collect
import com.kieronquinn.app.taptap.utils.extensions.whenResumed

class AcceptCallAction(
serviceLifecycle: Lifecycle,
Expand All @@ -43,7 +39,7 @@ class AcceptCallAction(
}

init {
lifecycleScope.launchWhenResumed {
lifecycle.whenResumed {
phoneStateListener.collect {
notifyListeners()
}
Expand Down
Loading

0 comments on commit 56f8c83

Please sign in to comment.