Merge "Fix bugs with Remote Connection Services." into qt-dev

This commit is contained in:
Tyler Gunn
2019-06-01 23:52:16 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 1 deletions

View File

@@ -325,6 +325,15 @@ final class ConnectionServiceAdapter implements DeathRecipient {
} catch (RemoteException e) {
Log.e(this, e, "Exception trying to query for remote CSs");
}
} else {
try {
// This is not an error condition, so just pass back an empty list.
// This happens when querying from a remote connection service, not the connection
// manager itself.
callback.onResult(Collections.EMPTY_LIST, Collections.EMPTY_LIST);
} catch (RemoteException e) {
Log.e(this, e, "Exception trying to query for remote CSs");
}
}
}

View File

@@ -477,7 +477,7 @@ final class ConnectionServiceAdapterServant {
SomeArgs args = SomeArgs.obtain();
args.arg1 = callback;
args.arg2 = callingPackage;
mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget();
mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, args).sendToTarget();
}
@Override