Commit 3367df50 authored by Philippe De Swert's avatar Philippe De Swert

[usb-moded] change android values again

* Fix mess with iProduct and idProduct
* Make all config file values match the sysfs entries
Signed-off-by: default avatarPhilippe De Swert <philippe.deswert@jollamobile.com>
parent 00e0b530
......@@ -54,7 +54,7 @@ void android_init_values(void)
write_to_file("/sys/class/android_usb/android0/iManufacturer", text);
g_free((char *)text);
}
text = get_android_vendor();
text = get_android_vendor_id();
if(text)
{
write_to_file("/sys/class/android_usb/android0/idVendor", text);
......@@ -66,5 +66,11 @@ void android_init_values(void)
write_to_file("/sys/class/android_usb/android0/iProduct", text);
g_free((char *)text);
}
text = get_android_product_id();
if(text)
{
write_to_file("/sys/class/android_usb/android0/idProduct", text);
g_free((char *)text);
}
}
......@@ -504,9 +504,10 @@ const char * get_android_manufacturer(void)
{
return(get_conf_string(ANDROID_ENTRY, ANDROID_MANUFACTURER_KEY));
}
const char * get_android_vendor(void)
const char * get_android_vendor_id(void)
{
return(get_conf_string(ANDROID_ENTRY, ANDROID_VENDOR_KEY));
return(get_conf_string(ANDROID_ENTRY, ANDROID_VENDOR_ID_KEY));
}
const char * get_android_product(void)
......@@ -514,6 +515,11 @@ const char * get_android_product(void)
return(get_conf_string(ANDROID_ENTRY, ANDROID_PRODUCT_KEY));
}
const char * get_android_product_id(void)
{
return(get_conf_string(ANDROID_ENTRY, ANDROID_PRODUCT_ID_KEY));
}
int check_android_section(void)
{
GKeyFile *settingsfile;
......
......@@ -51,9 +51,10 @@
#define SOFT_CONNECT_ENTRY "soft_connect"
#define SOFT_CONNECT_PATH_KEY "soft_connect_path"
#define ANDROID_ENTRY "android"
#define ANDROID_MANUFACTURER_KEY "idManufacturer"
#define ANDROID_VENDOR_KEY "idVendor"
#define ANDROID_PRODUCT_KEY "idProduct"
#define ANDROID_MANUFACTURER_KEY "iManufacturer"
#define ANDROID_VENDOR_ID_KEY "idVendor"
#define ANDROID_PRODUCT_KEY "iProduct"
#define ANDROID_PRODUCT_ID_KEY "idProduct"
const char * find_mounts(void);
int find_sync(void);
......@@ -83,8 +84,9 @@ const char * get_network_gateway(void);
const char * get_soft_connect_path(void);
const char * get_android_manufacturer(void);
const char * get_android_vendor(void);
const char * get_android_vendor_id(void);
const char * get_android_product(void);
const char * get_android_product_id(void);
int check_android_section(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment