Remove hardcoded path to Android SDK directory

Summary: Closes https://github.com/facebook/Sonar/pull/19

Differential Revision: D8383484

Pulled By: danielbuechele

fbshipit-source-id: cabf6daed9c0919c186f88eb154d201818723ed6
This commit is contained in:
Michael Evans
2018-06-12 12:23:12 -07:00
committed by Facebook Github Bot
parent 28be3c7cd8
commit 5c779b9176

View File

@@ -145,7 +145,7 @@ class DevicesButton extends Component<Props, State> {
getEmulatorNames(): Promise<Array<string>> {
return new Promise((resolve, reject) => {
child_process.exec(
'/opt/android_sdk/tools/emulator -list-avds',
'$ANDROID_HOME/tools/emulator -list-avds',
(error: ?Error, data: ?string) => {
if (error == null && data != null) {
resolve(data.split('\n').filter(name => name !== ''));
@@ -190,7 +190,7 @@ class DevicesButton extends Component<Props, State> {
launchEmulator = (name: string) => {
child_process.exec(
`/opt/android_sdk/tools/emulator @${name}`,
`$ANDROID_HOME/tools/emulator @${name}`,
this.updateEmulatorState,
);
};