Fix profile check logic to distinguish ivi and iot 01/191901/2 accepted/tizen/unified/20181107.081905 accepted/tizen/unified/20181108.074604 submit/tizen/20181105.232950 submit/tizen/20181106.081159 submit/tizen/20181108.005451
authorWootak Jung <wootak.jung@samsung.com>
Thu, 25 Oct 2018 06:14:27 +0000 (15:14 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 25 Oct 2018 06:33:38 +0000 (15:33 +0900)
Change-Id: Ia1105abf3b4f2593056910c3a06a82a27acbf97a

include/bluetooth-agent-profile.h

index fa3097d..c5302cc 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include <libintl.h>
 #include <stdlib.h>
+#include <string.h>
 #include <system_info.h>
 #include <gio/gio.h>
 
@@ -36,7 +37,8 @@ typedef enum {
        _PROFILE_WEARABLE = 0x2,
        _PROFILE_TV = 0x4,
        _PROFILE_IVI = 0x8,
-       _PROFILE_COMMON = 0x10,
+       _PROFILE_IOT = 0x10,
+       _PROFILE_COMMON = 0x20,
 } tizen_profile_t;
 
 /* For optimization, make this extern and define in a shared C file */
@@ -73,7 +75,12 @@ static inline tizen_profile_t get_tizen_profile()
                break;
        case 'i':
        case 'I':
-               profile = _PROFILE_IVI;
+               if (!strncasecmp(profileName, "ivi", 3))
+                       profile = _PROFILE_IVI;
+               else if (!strncasecmp(profileName, "iot", 3))
+                       profile = _PROFILE_IOT;
+               else
+                       profile = _PROFILE_COMMON;
                break;
        default: // common or unknown ==> ALL ARE COMMON.
                profile = _PROFILE_COMMON;