Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Side by Side Diff: dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/mobile/AndroidSdkManager.java

Issue 337623003: Version 1.5.0-dev.4.11 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014, the Dart project authors. 2 * Copyright (c) 2014, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
(...skipping 13 matching lines...) Expand all
24 24
25 /** 25 /**
26 * Manages access to the Android SDK 26 * Manages access to the Android SDK
27 */ 27 */
28 public class AndroidSdkManager { 28 public class AndroidSdkManager {
29 29
30 public static final String ANDROID_SDK_LOCATION_PREFERENCE = "androidSdkLocati on"; 30 public static final String ANDROID_SDK_LOCATION_PREFERENCE = "androidSdkLocati on";
31 31
32 private static final String CONTENT_SHELL_APK = "content_shell-android-arm-rel ease.apk"; 32 private static final String CONTENT_SHELL_APK = "content_shell-android-arm-rel ease.apk";
33 33
34 private static final String CONNECTION_TEST_APK = "com.google.dart.editor.mobi le.connection.service.apk";
35
34 private static final String ANDROID_DIRECTORY_NAME = "android"; 36 private static final String ANDROID_DIRECTORY_NAME = "android";
35 37
36 private static final String ADB_DIRECTORY_NAME = "adb"; 38 private static final String ADB_DIRECTORY_NAME = "adb";
37 39
38 private static AndroidSdkManager manager = new AndroidSdkManager(); 40 private static AndroidSdkManager manager = new AndroidSdkManager();
39 41
40 public static AndroidSdkManager getManager() { 42 public static AndroidSdkManager getManager() {
41 return manager; 43 return manager;
42 } 44 }
43 45
46 public String getConnectionTestApkLocation() {
47 File androidDir = getAndroidDir();
48 return androidDir.getAbsolutePath() + File.separator + CONNECTION_TEST_APK;
49 }
50
44 // the apk is in installdir/android 51 // the apk is in installdir/android
45 public String getContentShellApkLocation() { 52 public String getContentShellApkLocation() {
46 File androidDir = getAndroidDir(); 53 File androidDir = getAndroidDir();
47 return androidDir.getAbsolutePath() + File.separator + CONTENT_SHELL_APK; 54 return androidDir.getAbsolutePath() + File.separator + CONTENT_SHELL_APK;
48 } 55 }
49 56
50 public String getSdkLocationPreference() { 57 public String getSdkLocationPreference() {
51 return DartCore.getPlugin().getPrefs().get(ANDROID_SDK_LOCATION_PREFERENCE, ""); 58 return DartCore.getPlugin().getPrefs().get(ANDROID_SDK_LOCATION_PREFERENCE, "");
52 } 59 }
53 60
(...skipping 28 matching lines...) Expand all
82 } 89 }
83 return FileUtilities.ensureExecutable(adbFile) ? adbFile : null; 90 return FileUtilities.ensureExecutable(adbFile) ? adbFile : null;
84 } 91 }
85 92
86 private File getAndroidDir() { 93 private File getAndroidDir() {
87 return new File( 94 return new File(
88 DartSdkManager.getManager().getSdk().getDirectory().getParentFile(), 95 DartSdkManager.getManager().getSdk().getDirectory().getParentFile(),
89 ANDROID_DIRECTORY_NAME); 96 ANDROID_DIRECTORY_NAME);
90 } 97 }
91 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698