Skip to content

Commit

Permalink
Update ShadowInCallService.setPhone to use @constructor correct.
Browse files Browse the repository at this point in the history
Before, this would use inCallService as the realObject,
but instead it should be just using the reflector with no real
object added to it.

PiperOrigin-RevId: 631206060
  • Loading branch information
JuliaSullivanGoogle authored and Copybara-Service committed May 7, 2024
1 parent 7055db2 commit db1d4db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ private void setPhone() {
InCallAdapter adapter = Shadow.newInstanceOf(InCallAdapter.class);
Phone phone;
if (VERSION.SDK_INT > N_MR1) {
phone = reflector(ReflectorPhone.class, inCallService).newInstance(adapter, "", 0);
phone = reflector(ReflectorPhone.class).newInstance(adapter, "", 0);
} else {
phone = reflector(ReflectorPhone.class, inCallService).newInstance(adapter);
phone = reflector(ReflectorPhone.class).newInstance(adapter);
}
ReflectionHelpers.setField(inCallService, "mPhone", phone);
}
Expand Down

0 comments on commit db1d4db

Please sign in to comment.