Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#12,490 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
android, java

Piste de recherche

Commencez par suivre IntentNameResolver, le répartiteur de charge pick-first et BinderClientTransport afin de comprendre comment les services Android correspondants sont sélectionnés et comment les échecs de connexion déclenchent le failover. L’issue ne fournit aucun nom de fichier ni de test ; la tâche est terminée lorsque plusieurs services correspondants utilisent le service ayant la priorité la plus élevée, sans masquer les échecs de connexion transitoires par un fallback involontaire.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Java
Étoiles
12.1k
Forks
4k
Merge moyen
1 j 19 h
PR mergées (30 j)
42

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de grpc/grpc-java

Toutes les issues de grpc/grpc-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.