From: Seonah Moon Date: Mon, 22 Aug 2016 09:01:28 +0000 (+0900) Subject: Replace deprecated dpm handles with device_policy_manager_h X-Git-Tag: accepted/tizen/common/20160824.154529^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba3cd480c44b16834a398b8b0faf8e188606e175;hp=f04ba6c0f0d6ce0cd5b73ba051fa90eb4af00396;p=apps%2Fnative%2Fug-mobile-ap.git Replace deprecated dpm handles with device_policy_manager_h Change-Id: I9b148a7670e0c0c35a647eb0e9e7c9088bb27c58 Signed-off-by: Seonah Moon --- diff --git a/packaging/ug-setting-mobileap-efl.spec b/packaging/ug-setting-mobileap-efl.spec index 4ed6cfd..e2b1756 100755 --- a/packaging/ug-setting-mobileap-efl.spec +++ b/packaging/ug-setting-mobileap-efl.spec @@ -3,7 +3,7 @@ Name: ug-setting-mobileap-efl Summary: Tethering UI Gadget Library -Version: 1.0.146 +Version: 1.0.147 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/src/mh_view_main.c b/src/mh_view_main.c index 1ed681f..b97aaf9 100755 --- a/src/mh_view_main.c +++ b/src/mh_view_main.c @@ -555,38 +555,29 @@ void _update_main_view(mh_appdata_t *ad, tethering_type_e type) static int __is_allowed(tethering_type_e type) { int state = 0; - dpm_context_h context = NULL; - dpm_restriction_policy_h policy = NULL; + device_policy_manager_h dpm = NULL; - context = dpm_context_create(); - if (context == NULL) { - ERR("Failed to create dpm context!!"); - return 0; - } - - policy = dpm_context_acquire_restriction_policy(context); - if (policy == NULL) { - ERR("Failed to create policy handle"); - dpm_context_destroy(context); + dpm = dpm_manager_create(); + if (dpm == NULL) { + ERR("Failed to create device policy manager!!"); return 0; } switch(type) { case TETHERING_TYPE_WIFI: - dpm_restriction_get_wifi_hotspot_state(policy, &state); + dpm_restriction_get_wifi_hotspot_state(dpm, &state); break; case TETHERING_TYPE_USB: - dpm_restriction_get_usb_tethering_state(policy, &state); + dpm_restriction_get_usb_tethering_state(dpm, &state); break; case TETHERING_TYPE_BT: - dpm_restriction_get_bluetooth_tethering_state(policy, &state); + dpm_restriction_get_bluetooth_tethering_state(dpm, &state); break; default: break; } - dpm_context_release_restriction_policy(context, policy); - dpm_context_destroy(context); + dpm_manager_destroy(dpm); return state; }