Re-use adb client

Summary: This class already has an adb client. Instead of creating new ones, should just use that.

Reviewed By: passy

Differential Revision: D10231152

fbshipit-source-id: c9426a12f0f6baf94026da51a79131d07e58053c
This commit is contained in:
John Knox
2018-10-24 04:29:34 -07:00
committed by Facebook Github Bot
parent ff6b1790cb
commit bd25e5e97c

View File

@@ -213,8 +213,7 @@ export default class CertificateProvider {
deviceCsrFilePath: string,
csr: string,
): Promise<string> {
const client = adb.createClient();
return client.listDevices().then((devices: Array<{id: string}>) => {
return this.adb.listDevices().then((devices: Array<{id: string}>) => {
const deviceMatchList = devices.map(device =>
// To find out which device requested the cert, search them
// all for a matching csr file.