From c2a229435b2199080c455a10b275341a43307369 Mon Sep 17 00:00:00 2001 From: Joseph Rodiz Date: Wed, 3 Sep 2025 13:31:15 -0600 Subject: [PATCH] Restore SessionLifecycleService as no-op --- .../src/main/AndroidManifest.xml | 4 +++ .../sessions/SessionLifecycleService.kt | 35 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 firebase-sessions/src/main/kotlin/com/google/firebase/sessions/SessionLifecycleService.kt diff --git a/firebase-sessions/src/main/AndroidManifest.xml b/firebase-sessions/src/main/AndroidManifest.xml index f0f9609f4e7..1a597b59b85 100644 --- a/firebase-sessions/src/main/AndroidManifest.xml +++ b/firebase-sessions/src/main/AndroidManifest.xml @@ -17,6 +17,10 @@ + diff --git a/firebase-sessions/src/main/kotlin/com/google/firebase/sessions/SessionLifecycleService.kt b/firebase-sessions/src/main/kotlin/com/google/firebase/sessions/SessionLifecycleService.kt new file mode 100644 index 00000000000..360a23e308d --- /dev/null +++ b/firebase-sessions/src/main/kotlin/com/google/firebase/sessions/SessionLifecycleService.kt @@ -0,0 +1,35 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.firebase.sessions + +import android.app.Service +import android.content.Intent + +/** + * A no-op implementation of SessionLifecycleService. + * + * This service was previously used for session management but has been effectively made a no-op as + * part of the architectural changes introduced in + * [PR #7318](https://github.com/firebase/firebase-android-sdk/pull/7318). It is retained to prevent + * `ClassNotFoundException` for older clients that might still have this service declared in their + * AndroidManifest.xml or for systems attempting to restart a previously running instance of this + * service. + */ +internal class SessionLifecycleService : Service() { + + override fun onBind(unused: Intent?) = null +}