mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
fix: tasker launch of shortcuts (#290)
This commit is contained in:
+17
-10
@@ -60,6 +60,10 @@ android {
|
||||
}
|
||||
debug { isDebuggable = true }
|
||||
|
||||
create(Constants.PRERELEASE) {
|
||||
initWith(buildTypes.getByName(Constants.RELEASE))
|
||||
}
|
||||
|
||||
create(Constants.NIGHTLY) {
|
||||
initWith(buildTypes.getByName(Constants.RELEASE))
|
||||
}
|
||||
@@ -184,19 +188,22 @@ dependencies {
|
||||
}
|
||||
|
||||
fun determineVersionCode(): Int {
|
||||
return if (isNightlyBuild()) {
|
||||
Constants.VERSION_CODE +
|
||||
Constants.NIGHTLY_CODE
|
||||
} else {
|
||||
Constants.VERSION_CODE
|
||||
return with(getBuildTaskName().lowercase()) {
|
||||
when {
|
||||
contains(Constants.NIGHTLY) -> Constants.VERSION_CODE + Constants.NIGHTLY_CODE
|
||||
contains(Constants.PRERELEASE) -> Constants.VERSION_CODE + Constants.PRERELEASE_CODE
|
||||
else -> Constants.VERSION_CODE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun determineVersionName(): String {
|
||||
return if (isNightlyBuild()) {
|
||||
Constants.VERSION_NAME +
|
||||
"-${grgitService.service.get().grgit.head().abbreviatedId}"
|
||||
} else {
|
||||
Constants.VERSION_NAME
|
||||
return with(getBuildTaskName().lowercase()) {
|
||||
when {
|
||||
contains(Constants.NIGHTLY) || contains(Constants.PRERELEASE) ->
|
||||
Constants.VERSION_NAME +
|
||||
"-${grgitService.service.get().grgit.head().abbreviatedId}"
|
||||
else -> Constants.VERSION_NAME
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +86,15 @@
|
||||
android:name="com.journeyapps.barcodescanner.CaptureActivity"
|
||||
android:screenOrientation="portrait"
|
||||
tools:replace="screenOrientation" />
|
||||
|
||||
<activity
|
||||
android:name=".service.shortcut.ShortcutsActivity"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:finishOnTaskLaunch="true"
|
||||
android:noHistory="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:finishOnTaskLaunch="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@android:style/Theme.NoDisplay" />
|
||||
|
||||
<service
|
||||
@@ -174,4 +178,4 @@
|
||||
android:name=".receiver.NotificationActionReceiver"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user