Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

binder: "intent:" target URIs that match multiple <service>s should only connect to the one of highest priority

Offen
#12,490 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
android, java

Rechercherichtung

Beginne damit, IntentNameResolver, den pick-first-Load-Balancer und BinderClientTransport nachzuverfolgen, um zu verstehen, wie passende Android-Dienste ausgewählt werden und Verbindungsfehler ein Failover auslösen. Das Issue nennt keine Datei- oder Testnamen; die Aufgabe ist erledigt, wenn mehrere passende Dienste den Dienst mit der höchsten Priorität verwenden, ohne vorübergehende Verbindungsfehler durch unbeabsichtigtes Fallback zu verschleiern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

binder

More than one <service> can advertise an <intent-filter> that matches a given Intent. IntentNameResolver returns all matches to the "pick-first" load balancer which tries them in priority order. If connecting to a first Service fails, pick-first will try the second highest priority Service.

Pick-first's fail-over behavior makes sense in the networked world where clients want to tolerate server failure and spotty connectivity. In the on-device context there are only two reasons we want fail-over:

  1. So an unauthorized app that maliciously gives itself a high <android:priority> can quickly be passed over by preauthorization, avoiding a denial-of-service situation.
  2. So multiple server apps in an <android:priority> hierarchy can independently collaborate on which of them is active by enabling/disabling only their own <service> components in PackageManager.

But BinderClientTransport can fail to connect for many transient reasons like:

  1. the phone/tablet is busy doing other things causing the server app to be slow to start (DEADLINE_EXCEEDED)
  2. the server app does many things other than host the target Service, and a bug in one of them crashes the whole process while the ServiceConnection is being established (UNAVAILABLE).
  3. the user "swipes away" the server app's actiivity from the "recents" UI just as the ServiceConnection is being established (UNAVAILABLE).
  4. the server app is manually/automatically updated to a newer version and android kills all its processes while the ServiceConnection is being established (UNAVAILABLE).

Fail-over for these other reasons is problematic because different AndroidComponentAddresss are likely different implementations of the requested interface. It would be like if you selected Chrome as your default mobile browser but when you clicked on a URL, your phone failed over to Firefox if it didn’t launch fast enough. Perhaps that’s better than failing to show the web page at all, but it's also masking the underlying problem with the explicitly configured first choice browser in a way that's surprising and non-deterministic.

Vorherrschende Sprache
Java
Sterne
12.1k
Forks
4k
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
30

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus grpc/grpc-java

Alle Issues in grpc/grpc-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.