Merge "Keep smartspace session object" into udc-dev am: 441e1e19bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23416628 Change-Id: I4273090e610692fb5971dfe4f265c86c10f519c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -53,6 +53,7 @@ import android.text.TextUtils
|
|||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.util.Pair as APair
|
import android.util.Pair as APair
|
||||||
import androidx.media.utils.MediaConstants
|
import androidx.media.utils.MediaConstants
|
||||||
|
import com.android.internal.annotations.Keep
|
||||||
import com.android.internal.logging.InstanceId
|
import com.android.internal.logging.InstanceId
|
||||||
import com.android.keyguard.KeyguardUpdateMonitor
|
import com.android.keyguard.KeyguardUpdateMonitor
|
||||||
import com.android.systemui.Dumpable
|
import com.android.systemui.Dumpable
|
||||||
@@ -219,7 +220,7 @@ class MediaDataManager(
|
|||||||
private val mediaEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
|
private val mediaEntries: LinkedHashMap<String, MediaData> = LinkedHashMap()
|
||||||
// There should ONLY be at most one Smartspace media recommendation.
|
// There should ONLY be at most one Smartspace media recommendation.
|
||||||
var smartspaceMediaData: SmartspaceMediaData = EMPTY_SMARTSPACE_MEDIA_DATA
|
var smartspaceMediaData: SmartspaceMediaData = EMPTY_SMARTSPACE_MEDIA_DATA
|
||||||
private var smartspaceSession: SmartspaceSession? = null
|
@Keep private var smartspaceSession: SmartspaceSession? = null
|
||||||
private var allowMediaRecommendations = allowMediaRecommendations(context)
|
private var allowMediaRecommendations = allowMediaRecommendations(context)
|
||||||
|
|
||||||
private val artworkWidth =
|
private val artworkWidth =
|
||||||
@@ -381,6 +382,8 @@ class MediaDataManager(
|
|||||||
|
|
||||||
fun destroy() {
|
fun destroy() {
|
||||||
smartspaceMediaDataProvider.unregisterListener(this)
|
smartspaceMediaDataProvider.unregisterListener(this)
|
||||||
|
smartspaceSession?.close()
|
||||||
|
smartspaceSession = null
|
||||||
context.unregisterReceiver(appChangeReceiver)
|
context.unregisterReceiver(appChangeReceiver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user