Skip to content

Commit

Permalink
Move fireOnBind() method after register callback, make sure the inner…
Browse files Browse the repository at this point in the history
… callback can be called correctly
  • Loading branch information
codezjx committed Aug 4, 2023
1 parent ab12257 commit 1b8227a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ private ServiceConnection createServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service) {
Logger.d(TAG, "onServiceConnected:" + name + " service:" + service);
mTransferService = ITransfer.Stub.asInterface(service);
fireOnBind();
try {
mTransferService.register(mCallback);
} catch (RemoteException e) {
e.printStackTrace();
}
fireOnBind();
}

@Override
Expand Down

0 comments on commit 1b8227a

Please sign in to comment.