android: add dynamic vendor / model support in gsettings
Rhythmbox uses hard coded list of vendor
and model
strings to detect android devices, as shown below:
const char *androids[] = {
"Android",
"Nexus",
"Pixel",
"Nexus_5X"
};
const char *android_vendors[] = {
"motorola",
"OnePlus",
"Google",
"bq"
};
It works for most devices, but still doesn't cover all devices which could work fine with Rhythmbox. The code will always lag a bit in this regard. So, the following gsettings can be added to dynamically add support for Android devices not in the supported list in code.
<key name="android_vendors" type="as">
<default>[]</default>
<summary>List of android vendors</summary>
<description>List of android vendors that will be looked up by Rhythmbox Android plugin during device detection</description>
</key>
<key name="android_models" type="as">
<default>[]</default>
<summary>List of android models</summary>
<description>List of android models that will be looked up by Rhythmbox Android plugin during device detection</description>
</key>
If a device is detected as an MTP device by MTP plugin ( after Android plugin bails out ), and if the device doesn't support all interface methods required for successful MTP sync, Rhythmbox should display a warning message about it, and inform user about these 2 gsettings, before attempting a sync, as MTP plugin sync handling of Android devices is totally random from what I have seen.