From d297b7bae233cb858b5396ca1ee729fb01506930 Mon Sep 17 00:00:00 2001 From: Chaiwat Ekkaewnumchai Date: Mon, 16 Sep 2019 05:31:10 -0700 Subject: [PATCH] Indicate Outdated SDK Version after App Name Summary: Per title Earlier SDK version and this version (3) of Flipper determine a device for an app differently, so there is a case that both versions of the same app can refer to the same device which uses mutual name. To resolve this problem, we change the name of previous SDK version of an app, so that 1) Both versions will be shown on the sidebar 2) Users know and hopefully update their apps to resolve the connection issue Reviewed By: jknoxville Differential Revision: D17376199 fbshipit-source-id: 3dc7c9b0bf99ff06c11c83eff0c72b6ce12f1a5a --- src/server.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server.tsx b/src/server.tsx index d56b9b503..7576087e1 100644 --- a/src/server.tsx +++ b/src/server.tsx @@ -314,6 +314,14 @@ class Server extends EventEmitter { : Promise.resolve(query.device_id) ).then(csrId => { query.device_id = csrId; + // in previous version (before 3), app may not appear in correct device + // section because it refers to the name given by client which is not fixed + // for android emulators, so it is indicated as outdated so that developers + // might want to update SDK to get rid of this connection swap problem + if (query.sdk_version && query.sdk_version < 3) { + query.app += ' (Outdated SDK)'; + } + const id = `${query.app}#${query.os}#${query.device}#${csrId}`; console.debug(`Device connected: ${id}`, 'server');