Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,18 @@ object ManagerService : ILSPManagerService.Stub() {

class ManagerGuard(private val binder: IBinder, val pid: Int, val uid: Int) :
IBinder.DeathRecipient {
// system_server dispatches the 3-argument callback up to Android 16 and the
// 4-argument one from Android 17 on.
private val connection =
object : android.app.IServiceConnection.Stub() {
override fun connected(name: ComponentName?, service: IBinder?, dead: Boolean) {}

override fun connected(
name: ComponentName?,
service: IBinder?,
session: android.app.IBinderSession?,
dead: Boolean
) {}
}

init {
Expand Down
9 changes: 9 additions & 0 deletions hiddenapi/stubs/src/main/java/android/app/IBinderSession.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package android.app;

import android.os.IInterface;

/**
* Stub of {@code android.app.IBinderSession}, added in Android 17 (API 37),
* where it appears as a parameter of {@link IServiceConnection#connected}.
*/
public interface IBinderSession extends IInterface {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
import android.os.IInterface;

public interface IServiceConnection extends IInterface {

/** Declared by the framework up to Android 16. */
void connected(ComponentName name, IBinder service, boolean dead);

/** Declared by the framework from Android 17 (API 37) on. */
void connected(ComponentName name, IBinder service, IBinderSession session, boolean dead);

abstract class Stub extends Binder implements IServiceConnection {

public static IServiceConnection asInterface(IBinder obj) {
Expand Down