/**@class android.os.SELinux @extends java.lang.Object This class provides access to the centralized jni bindings for SELinux interaction. {@hide} */ var SELinux = { /**Determine whether SELinux is disabled or enabled. @return {Boolean} a boolean indicating whether SELinux is enabled. */ isSELinuxEnabled : function( ) {}, /**Determine whether SELinux is permissive or enforcing. @return {Boolean} a boolean indicating whether SELinux is enforcing. */ isSELinuxEnforced : function( ) {}, /**Sets the security context for newly created file objects. @param {String} context a security context given as a String. @return {Boolean} a boolean indicating whether the operation succeeded. */ setFSCreateContext : function( ) {}, /**Change the security context of an existing file object. @param {String} path representing the path of file object to relabel. @param {String} context new security context given as a String. @return {Boolean} a boolean indicating whether the operation succeeded. */ setFileContext : function( ) {}, /**Get the security context of a file object. @param {String} path the pathname of the file object. @return {String} a security context given as a String. */ getFileContext : function( ) {}, /**Get the security context of a peer socket. @param {Object {FileDescriptor}} fd FileDescriptor class of the peer socket. @return {String} a String representing the peer socket security context. */ getPeerContext : function( ) {}, /**Gets the security context of the current process. @return {String} a String representing the security context of the current process. */ getContext : function( ) {}, /**Gets the security context of a given process id. @param {Number} pid an int representing the process id to check. @return {String} a String representing the security context of the given pid. */ getPidContext : function( ) {}, /**Check permissions between two security contexts. @param {String} scon The source or subject security context. @param {String} tcon The target or object security context. @param {String} tclass The object security class name. @param {String} perm The permission name. @return {Boolean} a boolean indicating whether permission was granted. */ checkSELinuxAccess : function( ) {}, /**Restores a file to its default SELinux security context. If the system is not compiled with SELinux, then {@code true} is automatically returned. If SELinux is compiled in, but disabled, then {@code true} is returned. @param {String} pathname The pathname of the file to be relabeled. @return {Boolean} a boolean indicating whether the relabeling succeeded. @exception NullPointerException if the pathname is a null object. */ restorecon : function( ) {}, /**Restores a file to its default SELinux security context. If the system is not compiled with SELinux, then {@code true} is automatically returned. If SELinux is compiled in, but disabled, then {@code true} is returned. @param {Object {File}} file The File object representing the path to be relabeled. @return {Boolean} a boolean indicating whether the relabeling succeeded. @exception NullPointerException if the file is a null object. */ restorecon : function( ) {}, /**Recursively restores all files under the given path to their default SELinux security context. If the system is not compiled with SELinux, then {@code true} is automatically returned. If SELinux is compiled in, but disabled, then {@code true} is returned. @return {Boolean} a boolean indicating whether the relabeling succeeded. */ restoreconRecursive : function( ) {}, };