# Copyright (c) 2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#     * Neither the name of The Linux Foundation nor the names of its
#       contributors may be used to endorse or promote products derived
#       from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# generic/vendor_location_app.te - sepolicy rules for qti value added location apps
# that will be part of system image. Eg: XT app.

app_domain(vendor_location_app)
binder_use(vendor_location_app)
hal_client_domain(vendor_location_app, hal_gnss)

net_domain(vendor_location_app)

#Permissions for JDWP
userdebug_or_eng(`
  allow vendor_location_app { adbd su }:unix_stream_socket connectto;
')

allow vendor_location_app app_api_service:service_manager find;

allow vendor_location_app system_app_data_file:dir create_dir_perms;
allow vendor_location_app system_app_data_file:file create_file_perms;

allow vendor_location_app radio_service:service_manager find;

unix_socket_connect(vendor_location_app, vendor_dpmtcm, vendor_dpmd);

allow vendor_location_app cgroup:file rw_file_perms;

unix_socket_send(vendor_location_app, vendor_seempdw, vendor_seempd);
