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:
committed by
Facebook Github Bot
parent
28be3c7cd8
commit
5c779b9176
@@ -145,7 +145,7 @@ class DevicesButton extends Component<Props, State> {
|
|||||||
getEmulatorNames(): Promise<Array<string>> {
|
getEmulatorNames(): Promise<Array<string>> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
child_process.exec(
|
child_process.exec(
|
||||||
'/opt/android_sdk/tools/emulator -list-avds',
|
'$ANDROID_HOME/tools/emulator -list-avds',
|
||||||
(error: ?Error, data: ?string) => {
|
(error: ?Error, data: ?string) => {
|
||||||
if (error == null && data != null) {
|
if (error == null && data != null) {
|
||||||
resolve(data.split('\n').filter(name => name !== ''));
|
resolve(data.split('\n').filter(name => name !== ''));
|
||||||
@@ -190,7 +190,7 @@ class DevicesButton extends Component<Props, State> {
|
|||||||
|
|
||||||
launchEmulator = (name: string) => {
|
launchEmulator = (name: string) => {
|
||||||
child_process.exec(
|
child_process.exec(
|
||||||
`/opt/android_sdk/tools/emulator @${name}`,
|
`$ANDROID_HOME/tools/emulator @${name}`,
|
||||||
this.updateEmulatorState,
|
this.updateEmulatorState,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user