Chromium Code Reviews| Index: base/android/sys_utils_android.cc |
| diff --git a/base/android/sys_utils_android.cc b/base/android/sys_utils_android.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9aa27d90a90e2f581532a5f57033f2c8d7ee09fe |
| --- /dev/null |
| +++ b/base/android/sys_utils_android.cc |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/android/sys_utils_android.h" |
| + |
| +#include "base/android/build_info.h" |
| +#include "base/lazy_instance.h" |
| +#include "base/sys_info.h" |
| +#include "base/sys_info_internal.h" |
| +#include "jni/SysUtils_jni.h" |
| + |
| +namespace base { |
| +namespace android { |
| + |
| +bool SysUtilsAndroid::Register(JNIEnv* env) { |
| + return RegisterNativesImpl(env); |
| +} |
| + |
| +bool SysUtilsAndroid::IsLowEndDeviceFromJni() { |
| + JNIEnv* env = AttachCurrentThread(); |
| + return Java_SysUtils_isLowEndDevice(env); |
| +} |
| +} // namespace android |
|
brettw
2014/06/11 21:02:40
Blank line above here.
c.shu
2014/06/12 21:12:48
Done.
|
| + |
| +static base::LazyInstance< |
| + base::internal::LazySysInfoValue<bool, |
| + android::SysUtilsAndroid::IsLowEndDeviceFromJni> >::Leaky |
| + g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; |
| + |
| +bool SysUtils::IsLowEndDevice() { |
| + return g_lazy_low_end_device.Get().value(); |
| +} |
| +} // namespace base |
|
brettw
2014/06/11 21:02:40
Blank line above here
c.shu
2014/06/12 21:12:48
Done.
|