diff options
| author | Andreas Gampe <agampe@google.com> | 2015-06-08 20:47:50 -0700 |
|---|---|---|
| committer | Andreas Gampe <agampe@google.com> | 2015-06-09 09:22:55 -0700 |
| commit | ee0cdce2a80f8cc033378134e37092bc467c0f38 (patch) | |
| tree | 86ea518d01b983fd4b294d201208f44a3ee5e8b4 /core/java/android | |
| parent | 683e3cfef17bb1a80d7c387200ac491e663d5af2 (diff) | |
Frameworks/base: Add is64Bit method to Process
Add a public method to Process to query whether the current runtime
is running in 64-bit mode.
Bug: 21069469
Change-Id: Ifaf4251f05bbe5eba135fa977190e475632856bd
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/Process.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 009649fa0f90..dbb51464cb87 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -21,6 +21,7 @@ import android.net.LocalSocketAddress; import android.system.Os; import android.util.Log; import com.android.internal.os.Zygote; +import dalvik.system.VMRuntime; import java.io.BufferedWriter; import java.io.DataInputStream; import java.io.IOException; @@ -744,7 +745,14 @@ public class Process { * @return Returns the number of milliseconds this process has return. */ public static final native long getElapsedCpuTime(); - + + /** + * Returns true if the current process is a 64-bit runtime. + */ + public static final boolean is64Bit() { + return VMRuntime.getRuntime().is64Bit(); + } + /** * Returns the identifier of this process, which can be used with * {@link #killProcess} and {@link #sendSignal}. |
