Relocate and redefine usb_mode enum 62/273462/19 accepted/tizen/unified/20220505.134656 submit/tizen/20220502.091413 submit/tizen/20220503.013451
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 6 Apr 2022 05:13:44 +0000 (22:13 -0700)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 2 May 2022 07:55:30 +0000 (16:55 +0900)
The VCONFKEY_USB_CUR_MODE and VCONFKEY_USB_SEL_MODE will be changed to
have combination of usb functions, which is able to combine any type of
functions, not only the predefined set of combinations. The predefined
set of combination have been removed.

The values are redefined in capi-system-device.
 - USB_GADGET_FUNC_NONE  = 0x00
 - USB_GADGET_FUNC_SDB   = 0x01
 - USB_GADGET_FUNC_MTP   = 0x02
 - USB_GADGET_FUNC_RNDIS = 0x04
 - USB_GADGET_FUNC_ACM   = 0x08
 - USB_GADGET_FUNC_DIAG  = 0x10
 - USB_GADGET_FUNC_RMNET = 0x20

Modify default VCONFKEY_USB_SEL_MODE to 0x0b, which corresponds to the
previous default function combination, SDB(0x01)|MTP(0x02)|ACM(0x08).

Change-Id: I65c1309419c7d5d4a6a501005ba5a8672114d43e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
data/vconf-internal-usb-keys.xml
packaging/vconf-internal-keys.spec

index 36be85f..4e28e27 100644 (file)
@@ -6,33 +6,19 @@
     <val>0</val>
     <creator/>
     <email/>
-    <comment><![CDATA[Current usb gadget mode, 0 if usb is disconnected]]></comment>
-    <enumlist name="old_usb_mode">
-      <enumdata value="1">SET_USB_MTP</enumdata>
-      <enumdata value="2">SET_USB_MTP_SDB</enumdata>
-      <enumdata value="3">SET_USB_MTP_SDB_DIAG</enumdata>
-    </enumlist>
-    <enumlist name="usb_mode">
-      <enumdata value="0">SET_USB_NONE</enumdata>
-      <enumdata value="1">SET_USB_DEFAULT</enumdata>
-      <enumdata value="2">SET_USB_SDB</enumdata>
-      <enumdata value="3">SET_USB_SDB_DIAG</enumdata>
-      <enumdata value="4">SET_USB_RNDIS_TETHERING</enumdata>
-      <enumdata value="5">SET_USB_RNDIS </enumdata>
-      <enumdata value="6">SET_USB_RNDIS_SDB</enumdata>
-      <enumdata value="7">SET_USB_DIAG_SDB</enumdata>
-      <enumdata value="8">SET_USB_RNDIS_DIAG</enumdata>
-      <enumdata value="9">SET_USB_ACCESSORY</enumdata>
-      <enumdata value="11">SET_USB_DIAG_RMNET</enumdata>
-      <enumdata value="12">SET_USB_ACM_SDB_DM</enumdata>
-      <enumdata value="13">SET_USB_RNDIS_SDB_ACM</enumdata>
-    </enumlist>
+    <comment><![CDATA[Current usb gadget mode, combination of usb functions,
+ * e.g., USB_GADGET_FUNC_SDB | USB_GADGET_FUNC_ACM. Zero if usb is disconnected.
+ * The enum, USB_GADGET_FUNC_XXX, is defined in capi-system-device package.]]></comment>
   </vconfkey>
   <vconfkey type="int32" name="db/usb/sel_mode" readPriv="http://tizen.org/privilege/internal/default/platform" writePriv="http://tizen.org/privilege/internal/default/platform">
     <header>VCONFKEY_USB_SEL_MODE</header>
-    <val>2</val>
+    <val>0xb</val>
     <creator/>
     <email/>
-    <comment><![CDATA[Configured usb gadget mode, not affected by connection status (conntected or disconnected)]]></comment>
+    <comment><![CDATA[Configured usb gadget mode, not affected by connection status(connected or disconnected).
+ * It comprises usb-gadget functions, e.g., USB_GADGET_FUNC_SDB | USB_GADGET_FUNC_ACM.
+ * The enum, USB_GADGET_FUNC_XXX, is defined in capi-system-device package.
+ * The default value is 0xb, which means 0x01(SDB) | 0x02(MTP) | 0x08(ACM). It might be modified by user setting
+ * such as debugging mode or usb-tethering mode.]]></comment>
   </vconfkey>
 </vconfkeylists>
index a40be21..a6e58c0 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       vconf-internal-keys
 Summary:    Internal shared keys for vconf
-Version:    0.0.182
+Version:    0.0.183
 Release:    0
 Group:      Application Framework/Configuration
 License:    Apache-2.0