OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.base; | 5 package org.chromium.base; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.content.pm.ApplicationInfo; | 8 import android.content.pm.ApplicationInfo; |
9 import android.os.Environment; | 9 import android.os.Environment; |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 @CalledByNative | 66 @CalledByNative |
67 private static String getNativeLibraryDirectory(Context appContext) { | 67 private static String getNativeLibraryDirectory(Context appContext) { |
68 ApplicationInfo ai = appContext.getApplicationInfo(); | 68 ApplicationInfo ai = appContext.getApplicationInfo(); |
69 if ((ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 || | 69 if ((ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 || |
70 (ai.flags & ApplicationInfo.FLAG_SYSTEM) == 0) { | 70 (ai.flags & ApplicationInfo.FLAG_SYSTEM) == 0) { |
71 return ai.nativeLibraryDir; | 71 return ai.nativeLibraryDir; |
72 } | 72 } |
73 | 73 |
74 return "/system/lib/"; | 74 return "/system/lib/"; |
75 } | 75 } |
| 76 |
| 77 /** |
| 78 * @return the external storage directory. |
| 79 */ |
| 80 @SuppressWarnings("unused") |
| 81 @CalledByNative |
| 82 public static String getExternalStorageDirectory() { |
| 83 return Environment.getExternalStorageDirectory().getAbsolutePath(); |
| 84 } |
76 } | 85 } |
OLD | NEW |