- add sources.
[platform/framework/web/crosswalk.git] / src / base / android / java / src / org / chromium / base / SysUtils.java
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.base;
6
7 import android.app.ActivityManager;
8 import android.app.ActivityManager.MemoryInfo;
9 import android.content.Context;
10 import android.os.Build;
11
12 /**
13  * Exposes system related information about the current device.
14  */
15 public class SysUtils {
16     private static Boolean sLowEndDevice;
17
18     private SysUtils() { }
19
20     /**
21      * @return Whether or not this device should be considered a low end device.
22      */
23     public static boolean isLowEndDevice() {
24         if (sLowEndDevice == null) sLowEndDevice = nativeIsLowEndDevice();
25
26         return sLowEndDevice.booleanValue();
27     }
28
29     private static native boolean nativeIsLowEndDevice();
30 }