Skip to content

Commit

Permalink
Merge pull request KieronQuinn#272 from KieronQuinn/release/0.9_beta
Browse files Browse the repository at this point in the history
Release/0.9 beta
  • Loading branch information
KieronQuinn authored Oct 9, 2020
2 parents 68ae3e8 + 4f196f5 commit 703f8fd
Show file tree
Hide file tree
Showing 114 changed files with 3,877 additions and 566 deletions.
7 changes: 0 additions & 7 deletions .idea/codeStyles/Project.xml

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

11 changes: 8 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'

def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
def tagName = '0.8.1_beta'
def tagName = '0.9_beta'

android {
compileSdkVersion 30
Expand All @@ -16,9 +16,9 @@ android {
applicationId "com.kieronquinn.app.taptap"
minSdkVersion 24
targetSdkVersion 30
versionCode 8
versionCode 9

versionName "0.8.1 Beta"
versionName "0.9 Beta"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -94,6 +94,11 @@ dependencies {
implementation 'com.joaomgcd:taskerpluginlibrary:0.3.2'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
implementation "com.airbnb.android:lottie:3.4.0"
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
implementation 'me.saket:better-link-movement-method:2.2.0'
implementation 'com.github.judemanutd:autostarter:1.0.8'

//Testing
testImplementation 'junit:junit:4.12'
Expand Down
Binary file modified app/libs/columbus.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package com.kieronquinn.app.taptap

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.kieronquinn.app.taptap.models.TfModel
import com.kieronquinn.app.taptap.models.getDefaultTfModel
import junit.framework.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class ScreenSizeTests {

private val context by lazy {
InstrumentationRegistry.getInstrumentation().context
}

@Test
fun testSmallScreen(){
val screenSize = 5.0
val tfModel = context.getDefaultTfModel(screenSize)
assertTrue("Small size not handled correctly", tfModel == TfModel.PIXEL4)
}

@Test
fun testMediumScreen(){
val screenSize = 6.5
val tfModel = context.getDefaultTfModel(screenSize)
assertTrue("Medium size not handled correctly", tfModel == TfModel.PIXEL4XL)
}

@Test
fun testLargeScreen(){
val screenSize = 7.0
val tfModel = context.getDefaultTfModel(screenSize)
assertTrue("Large size not handled correctly", tfModel == TfModel.PIXEL4XL)
}

@Test
fun testMediumLowerBound(){
val screenSize = 6.24
val tfModel = context.getDefaultTfModel(screenSize)
assertTrue("Medium lower bound size not handled correctly", tfModel == TfModel.PIXEL4XL)
}

@Test
fun testSmallUpperBound(){
val screenSize = 6.23
val tfModel = context.getDefaultTfModel(screenSize)
assertTrue("Small upper bound size not handled correctly", tfModel == TfModel.PIXEL4)
}

}
82 changes: 49 additions & 33 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,98 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kieronquinn.app.taptap">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>

<application
android:name=".TapTapApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:name=".TapTapApplication"
android:theme="@style/AppTheme">

<activity android:name="com.kieronquinn.app.taptap.activities.SettingsActivity">
<activity android:name=".activities.SettingsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
</intent-filter>
</activity>

<activity android:name=".activities.WakeUpActivity"
android:theme="@style/TransparentActivity"/>
<activity
android:name=".activities.WakeUpActivity"
android:theme="@style/TransparentActivity" />

<activity android:name=".activities.AppPickerActivity" />
<activity android:name=".activities.ModalActivity" />

<service
android:name=".services.TapAccessibilityService"
android:label="@string/accessibility_service_label"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>

<service android:name="com.kieronquinn.app.taptap.services.TapAccessibilityService"
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibilityservice" />
</service>

<service
android:name=".services.TapGestureAccessibilityService"
android:label="@string/accessibility_service_label_gesture"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="@xml/accessibilityservice" />

<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/gestureaccessibilityservice" />
</service>

<provider
android:name=".providers.SharedPrefsProvider"
android:authorities="com.kieronquinn.app.taptap.provider.sharedprefs"
android:grantUriPermissions="true"
android:exported="false" />
android:exported="false"
android:grantUriPermissions="true" />

<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/AppTheme.ThirdPartyLicences" />

<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/AppTheme.ThirdPartyLicences" />

<activity android:name=".activities.ActivityConfigTaskerEvent"
<activity
android:name=".activities.ActivityConfigTaskerEvent"
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/tasker_config_label">
<intent-filter>
<action android:name="net.dinglisch.android.tasker.ACTION_EDIT_EVENT" />
</intent-filter>
</activity>

<activity android:name=".activities.ActivityConfigTaskerEventTriple"
<activity
android:name=".activities.ActivityConfigTaskerEventTriple"
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/tasker_config_label_triple">
<intent-filter>
<action android:name="net.dinglisch.android.tasker.ACTION_EDIT_EVENT" />
</intent-filter>
</activity>

<activity android:name=".activities.ReachabilityActivity"
android:theme="@style/ReachabilityTheme"/>
<activity
android:name=".activities.ReachabilityActivity"
android:theme="@style/ReachabilityTheme" />

<service android:name=".services.TapForegroundService" />

<service
android:name=".services.TapQSTile"
android:icon="@drawable/ic_taptap_logo"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action
android:name="android.service.quicksettings.action.QS_TILE"/>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ package com.kieronquinn.app.taptap
import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.kieronquinn.app.taptap.services.TapAccessibilityService
import com.kieronquinn.app.taptap.services.TapGestureAccessibilityService
import com.kieronquinn.app.taptap.utils.AppIconRequestHandler
import com.squareup.picasso.Picasso

class TapTapApplication : Application() {

var accessibilityService: MutableLiveData<TapAccessibilityService?> = MutableLiveData(null)
var gestureAccessibilityService: MutableLiveData<TapGestureAccessibilityService?> = MutableLiveData(null)

var disableWake = false

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.kieronquinn.app.taptap.activities

import android.content.res.Configuration
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.fragment.NavHostFragment
import com.kieronquinn.app.taptap.R
import dev.chrisbanes.insetter.Insetter

class ModalActivity: AppCompatActivity() {

companion object {
const val KEY_NAV_GRAPH = "nav_graph"
}

private val isLightTheme
get() = resources.configuration.uiMode.and(Configuration.UI_MODE_NIGHT_MASK) != Configuration.UI_MODE_NIGHT_YES

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Insetter.setEdgeToEdgeSystemUiFlags(window.decorView, true)
if(isLightTheme){
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility.or(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR).or(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR)
}
val navId = intent.getIntExtra(KEY_NAV_GRAPH, 0)
if(navId == 0){
finish()
return
}
setContentView(R.layout.activity_modal)
val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
val graph = navHostFragment.navController.navInflater.inflate(navId)
navHostFragment.navController.graph = graph
}

}
Loading

0 comments on commit 703f8fd

Please sign in to comment.