Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions firebase-sessions/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<!--<uses-sdk android:minSdkVersion="21"/>-->

<application>
<service
android:name="com.google.firebase.sessions.SessionLifecycleService"
android:enabled="false"
android:exported="false" />
<service
android:exported="false"
android:name="com.google.firebase.components.ComponentDiscoveryService">
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New files need a copyright header. You can copy it from another file in this package and make sure the year is right.


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
Comment on lines +26 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The KDoc references PR #7318 for the architectural changes. However, based on the pull request description, the major refactoring that removed this service was done in PR #7039. To provide accurate historical context for future maintainers, it would be better to reference the original refactoring PR.

Suggested change
* part of the architectural changes introduced in
* [PR #7318](https://github.com/firebase/firebase-android-sdk/pull/7318). It is retained to prevent
* part of the architectural changes introduced in
* [PR #7039](https://github.com/firebase/firebase-android-sdk/pull/7039). 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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add Kdoc that this is a no-op impl and maybe even link this PR for context


override fun onBind(unused: Intent?) = null
}
Loading