From fee0ada80e1c0ef9a5002409d21d0eed9e46e51f Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Wed, 11 Dec 2013 14:58:04 -0800 Subject: [PATCH] Fixes TIVI-2064 This is work-around to grant the app privilege to access the privacy APIs Since the pkg manager doesn't install the package information in the privacy database and the privacy-popup is not compatible with wayland and toyota's homescreen so for now just manually grant access by updating the privacy database directly. Change-Id: Iba9de2925f9288f4eec4f8a4bb43f8de97c6a4a6 Signed-off-by: Jimmy Huang --- packaging/Settings.changes | 3 +++ packaging/Settings.spec | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/packaging/Settings.changes b/packaging/Settings.changes index 613a214..942fec8 100644 --- a/packaging/Settings.changes +++ b/packaging/Settings.changes @@ -1,3 +1,6 @@ +* Wed Dec 11 2013 Jimmy Huang submit/tizen/20131127.215730@0e0c7db +- Fixes TIVI-2064 + * Wed Nov 27 2013 Jimmy Huang ivi_oct_m2@f9f74cb - Reverting previous commit to add locale privilege diff --git a/packaging/Settings.spec b/packaging/Settings.spec index aea0975..ddcc851 100644 --- a/packaging/Settings.spec +++ b/packaging/Settings.spec @@ -10,7 +10,9 @@ BuildRequires: zip BuildRequires: desktop-file-utils Requires: bluetooth-frwk-core Requires: bluetooth-frwk-service +Requires: privacy-manager-server Requires: settingsd +Requires: sqlite Requires: wrt-installer %description @@ -32,11 +34,24 @@ rm -rf %{buildroot} %post if [ -f /opt/usr/apps/.preinstallWidgets/preinstallDone ]; then wrt-installer -i /opt/usr/apps/.preinstallWidgets/Settings.wgt; + +# This is a work around to grant the app privilege to access the privacy APIs +# Since the pkg manager doesn't install the package information in the privacy database +# and the privacy-popup is not displaying to allow user to grant access, so for now +# just manually grant access by updating the privacy database directly + sqlite3 /opt/dbspace/.privacy.db "DELETE FROM PackageInfo WHERE PKG_ID='ODBQpKvkS1'"; + sqlite3 /opt/dbspace/.privacy.db "DELETE FROM PrivacyInfo WHERE PKG_ID='ODBQpKvkS1'"; + sqlite3 /opt/dbspace/.privacy.db "INSERT INTO PackageInfo(PKG_ID, IS_SET) VALUES('ODBQpKvkS1', 1)"; + sqlite3 /opt/dbspace/.privacy.db "INSERT INTO PrivacyInfo(PKG_ID, PRIVACY_ID, IS_ENABLED) VALUES('ODBQpKvkS1', 'http://tizen.org/privacy/bluetooth', 1)"; fi %postun wrt-installer -un ODBQpKvkS1.Settings +# Remove privileges from database when uninstalling +sqlite3 /opt/dbspace/.privacy.db "DELETE FROM PackageInfo WHERE PKG_ID='ODBQpKvkS1'"; +sqlite3 /opt/dbspace/.privacy.db "DELETE FROM PrivacyInfo WHERE PKG_ID='ODBQpKvkS1'"; + %files %defattr(-,root,root,-) /opt/usr/apps/.preinstallWidgets/Settings.wgt -- 2.7.4