Read docs lol
This commit is contained in:
42
Android.bp
42
Android.bp
@@ -1,10 +1,44 @@
|
|||||||
|
# Primary SDK Library
|
||||||
java_sdk_library {
|
java_sdk_library {
|
||||||
name: "pawlet-device",
|
name: "pawlet-device",
|
||||||
srcs: ["core/java/**/*.java"],
|
srcs: ["core/java/**/*.java"],
|
||||||
api_packages: ["pawletos.device"],
|
api_packages: ["pawletos.device"],
|
||||||
libs: ["core-libart"],
|
|
||||||
sdk_version: "current",
|
# Dependencies
|
||||||
installable: true,
|
libs: ["android_stubs_current"],
|
||||||
|
static_libs: ["framework-minus-apex"],
|
||||||
|
|
||||||
|
# Build config
|
||||||
|
sdk_version: "system_current",
|
||||||
product_specific: true,
|
product_specific: true,
|
||||||
visibility: ["//packages/apps/..."]
|
installable: true,
|
||||||
|
resource_dirs: ["res"],
|
||||||
|
|
||||||
|
# Visibility
|
||||||
|
visibility: [
|
||||||
|
"//frameworks/base/...",
|
||||||
|
"//packages/apps/...",
|
||||||
|
"//vendor/...",
|
||||||
|
],
|
||||||
|
stability: "stable",
|
||||||
|
}
|
||||||
|
|
||||||
|
# SELinux Policy Module
|
||||||
|
se_policy {
|
||||||
|
name: "pawlet-device-sepolicy",
|
||||||
|
srcs: [
|
||||||
|
"sepolicy/pawlet_device.te",
|
||||||
|
"sepolicy/file_contexts",
|
||||||
|
"sepolicy/property_contexts",
|
||||||
|
],
|
||||||
|
installable: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
# Combined Module
|
||||||
|
android_module {
|
||||||
|
name: "pawlet-device-full",
|
||||||
|
srcs: [":pawlet-device"],
|
||||||
|
policy_deps: [":pawlet-device-sepolicy"],
|
||||||
|
product_specific: true,
|
||||||
|
installable: true,
|
||||||
}
|
}
|
15
api/current.txt
Normal file
15
api/current.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package pawletos.device {
|
||||||
|
@SystemApi
|
||||||
|
public class PawletDevice {
|
||||||
|
method public static String getBrandName(Context);
|
||||||
|
method public static String getCodename(Context);
|
||||||
|
method public static String getCurrentLocale(Context);
|
||||||
|
method public static String getManufactureDate();
|
||||||
|
method public static double getPawletSDKVersion();
|
||||||
|
method public static String getSeries();
|
||||||
|
method public static String getWarrantyExclusion();
|
||||||
|
method public static boolean isEmulator();
|
||||||
|
method public static boolean isPawletOS();
|
||||||
|
method public static boolean isRooted();
|
||||||
|
}
|
||||||
|
}
|
2
sepolicy/file_contexts
Normal file
2
sepolicy/file_contexts
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Label the JAR file
|
||||||
|
/system/framework/pawlet-device.jar u:object_r:pawlet_device_exec:s0
|
14
sepolicy/pawlet_device.te
Normal file
14
sepolicy/pawlet_device.te
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Type declarations
|
||||||
|
type pawlet_device, domain;
|
||||||
|
type pawlet_device_exec, exec_type, file_type, system_file_type;
|
||||||
|
|
||||||
|
# Inherit from core domain
|
||||||
|
typeattribute pawlet_device coredomain;
|
||||||
|
|
||||||
|
# Property access
|
||||||
|
get_prop(pawlet_device, oxmc_prop)
|
||||||
|
set_prop(pawlet_device, oxmc_prop)
|
||||||
|
|
||||||
|
# Framework interactions
|
||||||
|
allow pawlet_device framework_res:file { read getattr };
|
||||||
|
allow pawlet_device system_server:service_manager find;
|
4
sepolicy/property_contexts
Normal file
4
sepolicy/property_contexts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Custom properties
|
||||||
|
ro.oxmc..* u:object_r:oxmc_prop:s0
|
||||||
|
ro.pawlet..* u:object_r:oxmc_prop:s0
|
||||||
|
persist.pawlet..* u:object_r:oxmc_prop:s0
|
Reference in New Issue
Block a user