Skip to content

Commit

Permalink
Release/1.7.6 (#222)
Browse files Browse the repository at this point in the history
* - Fixed Expanded Smartspace widgets not being clickable when replacing Discover on Android 14 and on third party launchers in Android 15
- Fixed padding of Expanded Smartspace widget picker
- Experimental fix for upstream issue causing Expanded Smartspace issues, using a workaround Google has not merged since October 2021

* Bump version code
  • Loading branch information
KieronQuinn authored Jun 21, 2024
1 parent 47988c0 commit 962beac
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {

apply plugin: 'com.google.android.gms.oss-licenses-plugin'

def tagName = '1.7.5'
def tagCode = 175
def tagName = '1.7.6'
def tagCode = 176

android {
compileSdk 34
Expand Down
Binary file modified app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file modified app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 174,
"versionName": "1.7.4",
"versionCode": 175,
"versionName": "1.7.5",
"outputFile": "app-release.apk"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package androidx.recyclerview.widget

import android.content.Context
import android.util.AttributeSet
import androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemAnimatorListener

/**
* Hacky workaround for "`Tmp detached view should be removed from RecyclerView before it can be
* recycled`" issue in [RecyclerView], uses reflection to implement a fix from a PR that's not
* been merged since the 8th October 2021 - come on Google!
*
* nb: If you've come across this class and want to use it for your own project, go ahead. Just
* remember you will need to exclude RecyclerView's fields from obfuscation for it to work on
* release builds with Proguard enabled.
*/
open class AnimationFixedRecyclerView: RecyclerView {

constructor(context: Context, attributeSet: AttributeSet? = null, defStyleRes: Int):
super(context, attributeSet, defStyleRes)
constructor(context: Context, attributeSet: AttributeSet?):
this(context, attributeSet, 0)
constructor(context: Context):
this(context, null, 0)

/**
* Version of [RecyclerView.ItemAnimatorRestoreListener] with these changes applied:
* https://github.com/androidx/androidx/pull/252/files#diff-7ce233edce4e999e05f71d3e7ec147ca007785d7238dc226cf34b5da50df54b8L13257
*/
private inner class ItemAnimatorRestoreListener: ItemAnimatorListener {
override fun onAnimationFinished(item: ViewHolder) {
item.setIsRecyclable(true)
if (item.mShadowedHolder != null && item.mShadowingHolder == null) { // old vh
item.mShadowedHolder = null
}
// always null this because an OldViewHolder can never become NewViewHolder w/o being
// recycled.
item.mShadowingHolder = null
if (!item.shouldBeKeptAsChild()) {
if (item.isTmpDetached) {
removeDetachedView(item.itemView, false)
return
}
try {
if (!removeAnimatingView(item.itemView)) {
removeDetachedView(item.itemView, false)
}
}catch (e: IllegalArgumentException) {
//Absorb
}
}
}
}

private val mItemAnimatorListenerField = RecyclerView::class.java
.getDeclaredField("mItemAnimatorListener").apply { isAccessible = true }

private var mItemAnimatorListener: ItemAnimatorListener
get() = mItemAnimatorListenerField.get(this) as ItemAnimatorListener
set(value) = mItemAnimatorListenerField.set(this, value)

init {
mItemAnimatorListener = ItemAnimatorRestoreListener()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ class OverlayTrampolineActivity: AppCompatActivity() {
if (Build.VERSION.SDK_INT >= 34) {
activityOptions.pendingIntentBackgroundActivityStartMode =
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
activityOptions.pendingIntentCreatorBackgroundActivityStartMode =
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
}
try {
// The NEW_TASK flags are applied through the activity options and not as a part of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ExpandedAddWidgetBottomSheetFragment: BaseBottomSheetFragment<FragmentExpa
}

private fun setupInsets() {
val standardPadding = resources.getDimensionPixelSize(R.dimen.margin_16)
val standardPadding = resources.getDimensionPixelSize(R.dimen.margin_16) * 4
binding.addWidgetRecyclerView.onApplyInsets { view, insets ->
val bottom = insets.getInsets(
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.ime()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.view.View
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
import androidx.recyclerview.widget.AnimationFixedRecyclerView
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
Expand All @@ -28,7 +29,7 @@ import com.kieronquinn.app.smartspacer.utils.extensions.handleLifecycleEventSafe
* **Note: Only supports [LinearLayoutManager], and assumes that the [Adapter] will be un-set when
* the fragment is destroyed**
*/
open class LifecycleAwareRecyclerView : RecyclerView {
open class LifecycleAwareRecyclerView : AnimationFixedRecyclerView {

constructor(context: Context, attributeSet: AttributeSet? = null, defStyleRes: Int):
super(context, attributeSet, defStyleRes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ fun ActivityOptionsCompat.allowBackground() = apply {
}.get(this) as ActivityOptions
inner.apply {
pendingIntentBackgroundActivityStartMode = MODE_BACKGROUND_ACTIVITY_START_ALLOWED
pendingIntentCreatorBackgroundActivityStartMode = MODE_BACKGROUND_ACTIVITY_START_ALLOWED
}
}
}
6 changes: 3 additions & 3 deletions app/src/main/res/values-fr-rFR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<string name="bottom_nav_settings">Paramètres</string>
<string name="toast_restricted_mode">Autorisez les paramètres restreints en ouvrant le menu « ... »</string>
<string name="restricted_mode_content_accessibility">Depuis Android 13, Google interdit par défaut l\'accès aux services d\'accessibilité aux applications téléchargées en dehors du Play Store en forçant une vérification de sécurité dans les paramètres.\n\n<b>Si vous n\'arrivez pas à activer le service d\'accessibilité, vous devez ouvrir les Infos sur l\'appli et autoriser les paramètres restreints.</b></string>
<string name="restricted_mode_content_warning_accessibility"><![CDATA[Depuis Android 14, Google interdit l'accès aux services d'accessibilité aux applications installées par le Programme d'installation du kit.<br><br><b>Si un message vous indique que les paramètres sont restreints, vous devez alors désinstaller Smartspacer et le réinstaller à l'aider d'une application utilisant l'installation par session comme <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> ou <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">l'application APKMirror</a>. Vous DEVEZ désinstaller l'application AVANT de la réinstaller.<br><br></b>Un autre moyen de procéder est d'activer le mode amélioré (nécessite Shizuku ou un accès root).]]></string>
<string name="restricted_mode_content_warning_accessibility"><![CDATA[Depuis Android 14, Google interdit l\'accès aux services d\'accessibilité aux applications installées par le Programme d\'installation du kit.<br><br><b>Si un message vous indique que les paramètres sont restreints, vous devez alors désinstaller Smartspacer et le réinstaller à l\'aider d\'une application utilisant l\'installation par session comme <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> ou <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">l\'application APKMirror</a>. Vous DEVEZ désinstaller l\'application AVANT de la réinstaller.<br><br></b>Un autre moyen de procéder est d\'activer le mode amélioré (nécessite Shizuku ou un accès root).]]></string>
<string name="restricted_mode_content_notification">Depuis Android 13, Google interdit par défaut l\'accès aux notifications aux applications téléchargées en dehors du Play Store en forçant une vérification de sécurité dans les paramètres.\n\n<b>Si vous n\'arrivez pas à accorder l\'accès aux notifications, vous devez ouvrir les Infos sur l\'appli et autoriser les paramètres restreints.</b></string>
<string name="restricted_mode_content_warning_notification"><![CDATA[Depuis Android 14, Google interdit l'accès aux notifications aux applications installées par le Programme d'installation du kit.<br><br><b>Si un message vous indique que les paramètres sont restreints, vous devez alors désinstaller Smartspacer et le réinstaller à l'aider d'une application utilisant l'installation par session comme <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> ou <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">l'application APKMirror</a>. Vous DEVEZ désinstaller l'application AVANT de la réinstaller.<br><br></b>Un autre moyen de procéder est d'activer le mode amélioré (nécessite Shizuku ou un accès root).]]></string>
<string name="restricted_mode_content_warning_notification"><![CDATA[Depuis Android 14, Google interdit l\'accès aux notifications aux applications installées par le Programme d\'installation du kit.<br><br><b>Si un message vous indique que les paramètres sont restreints, vous devez alors désinstaller Smartspacer et le réinstaller à l\'aider d\'une application utilisant l\'installation par session comme <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> ou <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">l\'application APKMirror</a>. Vous DEVEZ désinstaller l\'application AVANT de la réinstaller.<br><br></b>Un autre moyen de procéder est d\'activer le mode amélioré (nécessite Shizuku ou un accès root).]]></string>
<string name="restricted_mode_button">Ouvrir les Infos sur l\'appli</string>
<string name="restricted_mode_warning_button">Accorder l\'autorisation avec Shizuku</string>
<string name="target_sensitive_title">Contenus masqués</string>
Expand Down Expand Up @@ -449,7 +449,7 @@
<!-- Setup > Analytics -->
<string name="setup_analytics_title_short">Collecte de données</string>
<string name="setup_analytics_title">Données et rapports de plantage</string>
<string name="setup_analytics_content"><![CDATA[Smartspacer utilise un grand nombre d'APIs Android expérimentales et « cachées » qui pourraient mal fonctionner sur certains appareils à cause des personnalisations du fabricant.<br>Pour aider à la correction des bugs, Smartspacer peut envoyer les rapports de plantage à Firebase Crashlytics, avec des données statistiques de base (sur les lancements de l'application).<br>Toutes ces données sont anonymes et leur collecte est optionnelle. Plus de détails et règles de confidentialité <a href="https://kieronquinn.co.uk/redirect/smartspacer/privacy">ici</a>]]></string>
<string name="setup_analytics_content"><![CDATA[Smartspacer utilise un grand nombre d\'APIs Android expérimentales et « cachées » qui pourraient mal fonctionner sur certains appareils à cause des personnalisations du fabricant.<br>Pour aider à la correction des bugs, Smartspacer peut envoyer les rapports de plantage à Firebase Crashlytics, avec des données statistiques de base (sur les lancements de l\'application).<br>Toutes ces données sont anonymes et leur collecte est optionnelle. Plus de détails et règles de confidentialité <a href="https://kieronquinn.co.uk/redirect/smartspacer/privacy">ici</a>]]></string>
<string name="setup_analytics_allow">Autoriser</string>
<string name="setup_analytics_deny">Interdire</string>
<!-- Setup > Notifications -->
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<string name="bottom_nav_settings">Impostazioni</string>
<string name="toast_restricted_mode">Consenti impostazioni limitate nel menu di overflow</string>
<string name="restricted_mode_content_accessibility">Da Android 13, Google ha aggiunto un controllo di sicurezza alle impostazioni, impedendo alle applicazioni che sono state installate tramite sideload di utilizzare i servizi di accessibilità per impostazione predefinita.\n\n<b>Se vedi un messaggio di impostazioni limitate quando cerchi di abilitare il servizio di accessibilità, è necessario aprire Informazioni App consenti le impostazioni limitate.</b></string>
<string name="restricted_mode_content_warning_accessibility"><![CDATA[Da Android 14, Google ha impedito alle applicazioni installate utilizzando Installazione Pacchetti di utilizzare i servizi di accessibilità.<br><br><b>Se vedi un messaggio riguardo impostazioni limitate, è necessario disinstallare Smartspacer e reinstallarlo utilizzando un'applicazione basata su installer di sessione come <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> o l'app <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">APKMirror</a>. Aggiornare l'app (senza disinstallarla) NON è sufficiente.<br><br></b>In alternativa, con la modalità Enhanced attivata, Smartspacer aggirerà questo requisito (non può essere fatto senza Shizuku o root).]]></string>
<string name="restricted_mode_content_warning_accessibility"><![CDATA[Da Android 14, Google ha impedito alle applicazioni installate utilizzando Installazione Pacchetti di utilizzare i servizi di accessibilità.<br><br><b>Se vedi un messaggio riguardo impostazioni limitate, è necessario disinstallare Smartspacer e reinstallarlo utilizzando un\'applicazione basata su installer di sessione come <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> o l\'app <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">APKMirror</a>. Aggiornare l\'app (senza disinstallarla) NON è sufficiente.<br><br></b>In alternativa, con la modalità Enhanced attivata, Smartspacer aggirerà questo requisito (non può essere fatto senza Shizuku o root).]]></string>
<string name="restricted_mode_content_notification">Da Android 13, Google ha aggiunto un controllo di sicurezza alle impostazioni, impedendo alle applicazioni che sono state installate tramite sideload di inviare notifiche per impostazione predefinita.\n\n<b>Se vedi un messaggio di impostazioni limitate quando cerchi di abilitare le notifiche, è necessario aprire Informazioni App consenti le impostazioni limitate.</b></string>
<string name="restricted_mode_content_warning_notification"><![CDATA[Da Android 14, Google ha impedito alle applicazioni installate utilizzando Installazione Pacchetti di inviare notifiche.<br><br><b>Se vedi un messaggio riguardo impostazioni limitate, è necessario disinstallare Smartspacer e reinstallarlo utilizzando un'applicazione basata su installer di sessione come <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> o l'app <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">APKMirror</a>. Aggiornare l'app (senza disinstallarla) NON è sufficiente.<br><br></b>In alternativa, con la modalità Enhanced attivata, Smartspacer aggirerà questo requisito (non può essere fatto senza Shizuku o root).]]></string>
<string name="restricted_mode_content_warning_notification"><![CDATA[Da Android 14, Google ha impedito alle applicazioni installate utilizzando Installazione Pacchetti di inviare notifiche.<br><br><b>Se vedi un messaggio riguardo impostazioni limitate, è necessario disinstallare Smartspacer e reinstallarlo utilizzando un\'applicazione basata su installer di sessione come <a href="https://play.google.com/store/apps/details?id=com.aefyr.sai">Split APKs Installer (SAI)</a> o l\'app <a href="https://play.google.com/store/apps/details?id=com.apkmirror.helper.prod">APKMirror</a>. Aggiornare l\'app (senza disinstallarla) NON è sufficiente.<br><br></b>In alternativa, con la modalità Enhanced attivata, Smartspacer aggirerà questo requisito (non può essere fatto senza Shizuku o root).]]></string>
<string name="restricted_mode_button">Apri le informazioni dell\'app</string>
<string name="restricted_mode_warning_button">Concedi il permesso con Shizuku</string>
<string name="target_sensitive_title">Contenuto nascosto</string>
Expand Down Expand Up @@ -449,7 +449,7 @@
<!-- Setup > Analytics -->
<string name="setup_analytics_title_short">Analytics</string>
<string name="setup_analytics_title">Analytics &amp; Crash Report</string>
<string name="setup_analytics_content"><![CDATA[Smartspacer utilizza molte API Android sperimentali e "nascoste", che potrebbero essere maggiormente soggette a crash su alcuni device a causa di modifiche degli OEM.<br>Per agevolare il bug fixing, Smartspacer può inviare crash report a Firebase Crashlitics, insieme a delle analytics di base (lanci dell'app).<br>Questi dati sono tutti anonimi, e sono assolutamente opzionali, maggiori dettagli e privacy policy <a href="https://kieronquinn.co.uk/redirect/smartspacer/privacy">qui</a>]]></string>
<string name="setup_analytics_content"><![CDATA[Smartspacer utilizza molte API Android sperimentali e "nascoste", che potrebbero essere maggiormente soggette a crash su alcuni device a causa di modifiche degli OEM.<br>Per agevolare il bug fixing, Smartspacer può inviare crash report a Firebase Crashlitics, insieme a delle analytics di base (lanci dell\'app).<br>Questi dati sono tutti anonimi, e sono assolutamente opzionali, maggiori dettagli e privacy policy <a href="https://kieronquinn.co.uk/redirect/smartspacer/privacy">qui</a>]]></string>
<string name="setup_analytics_allow">Consenti</string>
<string name="setup_analytics_deny">Nega</string>
<!-- Setup > Notifications -->
Expand Down Expand Up @@ -492,7 +492,7 @@
<!-- Setup > Add Widget -->
<string name="setup_add_widget_title">Aggiungi widget</string>
<string name="setup_add_widget_content">Aggiungi Smartspacer alla schermata home</string>
<string name="setup_add_widget_lock"><![CDATA[Nota: Se si desidera aggiungere Smartspacer alla schermata di blocco, è necessario utilizzare un'app come <a href="https://play.google.com/store/apps/details?id=tk.zwander.lockscreenwidgets">Lock Screen Widgets</a> per aggiungere il widget.]]></string>
<string name="setup_add_widget_lock"><![CDATA[Nota: Se si desidera aggiungere Smartspacer alla schermata di blocco, è necessario utilizzare un\'app come <a href="https://play.google.com/store/apps/details?id=tk.zwander.lockscreenwidgets">Lock Screen Widgets</a> per aggiungere il widget.]]></string>
<!-- Setup > Requirements -->
<string name="setup_requirements_info_title">Requisiti</string>
<string name="setup_requirements_info_p1">I <b>Requisiti</b> consentono di personalizzare quando un target o una complicazione devono essere visualizzati in Smartspace. Con essi è possibile creare scenari in cui le informazioni utili vengono mostrate nello Smartspace.</string>
Expand Down
4 changes: 2 additions & 2 deletions sdk-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
}

dependencies {
api('com.kieronquinn.smartspacer:sdk-core:1.0.3')
api('com.kieronquinn.smartspacer:sdk-core:1.0.5')
implementation('androidx.core:core-ktx:1.13.1')
implementation('androidx.fragment:fragment-ktx:1.8.0')
implementation('androidx.constraintlayout:constraintlayout:2.1.4')
Expand All @@ -49,7 +49,7 @@ dependencies {
}

mavenPublishing {
coordinates("com.kieronquinn.smartspacer", "sdk-client", "1.0.10")
coordinates("com.kieronquinn.smartspacer", "sdk-client", "1.0.11")

pom {
name = "Smartspacer Client SDK"
Expand Down
2 changes: 1 addition & 1 deletion sdk-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
}

mavenPublishing {
coordinates("com.kieronquinn.smartspacer", "sdk-core", "1.0.4")
coordinates("com.kieronquinn.smartspacer", "sdk-core", "1.0.5")

pom {
name = "Smartspacer Core SDK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ private fun getActivityOptions(): ActivityOptions {
if (Build.VERSION.SDK_INT >= 34) {
pendingIntentBackgroundActivityStartMode =
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
pendingIntentCreatorBackgroundActivityStartMode =
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
}
}
}
Loading

0 comments on commit 962beac

Please sign in to comment.