From: Luiz Augusto von Dentz Date: Wed, 13 Apr 2022 22:21:00 +0000 (-0700) Subject: policy: Change AutoEnable default to true X-Git-Tag: accepted/tizen/unified/20230608.164325~280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49ef8ab470909c774c48fd9231cfc3918f865c2c;p=platform%2Fupstream%2Fbluez.git policy: Change AutoEnable default to true This changes the default of AutoEnable to true so controllers are power up by default. Fixes: https://github.com/bluez/bluez/issues/328 Signed-off-by: Manika Shrivastava Signed-off-by: Ayush Garg --- diff --git a/plugins/policy.c b/plugins/policy.c index 46bbb85..b75a0ba 100755 --- a/plugins/policy.c +++ b/plugins/policy.c @@ -957,7 +957,11 @@ static int policy_init(void) } auto_enable = g_key_file_get_boolean(conf, "Policy", "AutoEnable", - NULL); + &gerr); + if (gerr) { + g_clear_error(&gerr); + auto_enable = true; + } resume_delay = g_key_file_get_integer( conf, "Policy", "ResumeDelay", &gerr); diff --git a/src/main.conf b/src/main.conf index f735ff7..0d24eba 100755 --- a/src/main.conf +++ b/src/main.conf @@ -282,8 +282,8 @@ # AutoEnable defines option to enable all controllers when they are found. # This includes adapters present on start as well as adapters that are plugged -# in later on. Defaults to 'false'. -#AutoEnable=false +# in later on. Defaults to 'true'. +#AutoEnable=true # Audio devices that were disconnected due to suspend will be reconnected on # resume. ResumeDelay determines the delay between when the controller