1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.os;
18
19/**
20 * Java API for ::android::vintf::RuntimeInfo. Methods return null / 0 on any error.
21 *
22 * @hide
23 */
24public class VintfRuntimeInfo {
25
26    private VintfRuntimeInfo() {}
27
28    /**
29     * @return /sys/fs/selinux/policyvers, via security_policyvers() native call
30     */
31    public static native long getKernelSepolicyVersion();
32    /**
33     * @return content of /proc/cpuinfo
34     */
35    public static native String getCpuInfo();
36    /**
37     * @return os name extracted from uname() native call
38     */
39    public static native String getOsName();
40    /**
41     * @return node name extracted from uname() native call
42     */
43    public static native String getNodeName();
44    /**
45     * @return os release extracted from uname() native call
46     */
47    public static native String getOsRelease();
48    /**
49     * @return os version extracted from uname() native call
50     */
51    public static native String getOsVersion();
52    /**
53     * @return hardware id extracted from uname() native call
54     */
55    public static native String getHardwareId();
56    /**
57     * @return kernel version extracted from uname() native call. Format is
58     * {@code x.y.z}.
59     */
60    public static native String getKernelVersion();
61    /**
62     * @return libavb version in OS. Format is {@code x.y}.
63     */
64    public static native String getBootAvbVersion();
65    /**
66     * @return libavb version in bootloader. Format is {@code x.y}.
67     */
68    public static native String getBootVbmetaAvbVersion();
69
70}
71