OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.content.pm.PackageInfo; | 9 import android.content.pm.PackageInfo; |
10 import android.content.pm.PackageManager; | 10 import android.content.pm.PackageManager; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 @CalledByNative | 105 @CalledByNative |
106 public static String getPackageName(Context context) { | 106 public static String getPackageName(Context context) { |
107 String packageName = context != null ? context.getPackageName() : null; | 107 String packageName = context != null ? context.getPackageName() : null; |
108 return packageName != null ? packageName : ""; | 108 return packageName != null ? packageName : ""; |
109 } | 109 } |
110 | 110 |
111 @CalledByNative | 111 @CalledByNative |
| 112 public static String getBuildType() { |
| 113 return Build.TYPE; |
| 114 } |
| 115 |
| 116 @CalledByNative |
112 public static int getSdkInt() { | 117 public static int getSdkInt() { |
113 return Build.VERSION.SDK_INT; | 118 return Build.VERSION.SDK_INT; |
114 } | 119 } |
115 } | 120 } |
OLD | NEW |