From bd25e5e97ca96aa8a3b9eb41e58a9bec523ae967 Mon Sep 17 00:00:00 2001 From: John Knox Date: Wed, 24 Oct 2018 04:29:34 -0700 Subject: [PATCH] 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 --- src/utils/CertificateProvider.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/CertificateProvider.js b/src/utils/CertificateProvider.js index afceb9ad2..709a4e91d 100644 --- a/src/utils/CertificateProvider.js +++ b/src/utils/CertificateProvider.js @@ -213,8 +213,7 @@ export default class CertificateProvider { deviceCsrFilePath: string, csr: string, ): Promise { - 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.