Add support for Galaxy Buds Pro

- add generic coordinator and settings customizer for Galaxy Buds
- add Prefs to the DeviceSpecificSettingsCustomizer
- edit Changelog
This commit is contained in:
vanous 2022-05-17 22:18:49 +02:00
parent ed6b2e44b9
commit 948db604e5
33 changed files with 1719 additions and 270 deletions

View File

@ -2,7 +2,8 @@
### NEXT
* Initial Support for Sony WF-1000XM3
* Huami: Add Toggle function for Open Tracks tracking to button actionss
* Initial Support for Galaxy Buds Pro
* Huami: Add Toggle function for Open Tracks tracking to button actions
* Huami: Move inactivity warnings and goal notification to device-specific settings
* Mi Band 6: set time on connect
* Mi Band 5/6, Amazfit Bip S/U/Pro: Add world clock configuration
@ -16,9 +17,9 @@
* VESC: added battery indicator
* UM25: Add reset option to current accumulation
* UM25: Add notification on below current threshold
* Fix crash when calender is accessed but permission is denied
* Fix crash when calendar is accessed but permission is denied
* Add com.asus.asusincallui to blacklist
* New icons for Sony WF 800n and Mi Band 6
* New icons for Sony overhead headphones, Sony WF 800n and Mi Band 6
### 0.66.0
* Add basic support for Casio GBD-H1000

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="10.399478mm"
height="10.338884mm"
viewBox="0 0 10.399477 10.338885"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="buds_pro_case.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="1"
fit-margin-top="1"
inkscape:zoom="8"
inkscape:cx="39.6875"
inkscape:cy="37.9375"
inkscape:window-width="1920"
inkscape:window-height="1035"
inkscape:window-x="0"
inkscape:window-y="45"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-95.852619,-146.01635)">
<path
style="fill:#000000;stroke:#000000;stroke-width:0.4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 98.725767,155.07946 c -2.011931,-0.33512 -3.224531,-2.80083 -2.421739,-4.92438 0.698696,-1.8482 1.220768,-2.38464 2.716612,-2.79141 0.622809,-0.16937 3.23294,-0.2015 3.88217,-0.0478 1.27757,0.30245 1.88675,0.72802 2.36901,1.65499 0.70733,1.35957 0.89693,2.22299 0.71935,3.27582 -0.25793,1.52921 -1.29315,2.61077 -2.72307,2.84497 -0.55609,0.0911 -3.977465,0.0819 -4.542333,-0.0122 z m 4.644383,-0.15465 c 0.60321,-0.1105 1.30489,-0.48711 1.65427,-0.88788 0.30716,-0.35233 0.68597,-1.10792 0.76801,-1.53187 l 0.053,-0.27397 -0.22851,0.24421 c -0.33209,0.35491 -0.77469,0.62265 -1.34022,0.81074 -1.13605,0.37784 -5.214307,0.38683 -6.410497,0.0141 -0.55739,-0.17367 -1.193139,-0.55571 -1.433201,-0.86126 l -0.163268,-0.2078 0.04663,0.27396 c 0.07099,0.4171 0.462077,1.19611 0.773559,1.54089 0.330733,0.36608 0.957492,0.72348 1.500185,0.85545 0.505093,0.12283 4.140102,0.14063 4.780022,0.0234 z m 0.5638,-1.66846 c 0.91653,-0.23153 1.68237,-0.77465 1.90019,-1.34755 0.20798,-0.54704 -0.0205,-1.55801 -0.623,-2.75628 -0.4674,-0.9296 -1.05748,-1.37665 -2.19843,-1.66553 -0.67764,-0.17157 -3.410689,-0.14747 -4.065651,0.0359 -1.070946,0.29976 -1.649067,0.76556 -2.081871,1.67737 -0.99471,2.09563 -0.884667,3.03994 0.434692,3.73021 0.829113,0.43377 1.468822,0.5086 4.06904,0.47594 1.56307,-0.0196 2.19526,-0.0566 2.56503,-0.15002 z"
id="path1716" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="10.999999mm"
height="10.999998mm"
viewBox="0 0 11 10.999998"
version="1.1"
id="svg4576"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="buds_pro_left.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview4578"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-bottom="0"
fit-margin-left="0"
fit-margin-right="0"
inkscape:zoom="16"
inkscape:cx="32.09375"
inkscape:cy="39.15625"
inkscape:window-width="1920"
inkscape:window-height="1035"
inkscape:window-x="0"
inkscape:window-y="45"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true">
<sodipodi:guide
position="-47.790315,6.0004159"
orientation="0,-1"
id="guide34420" />
</sodipodi:namedview>
<defs
id="defs4573" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-93.982649,-153.80574)">
<path
id="path61748"
style="font-size:4.23333px;line-height:124%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;stroke:#000000;stroke-width:0.265"
d="m 98.636978,156.07032 h 0.367759 v 2.42358 h 1.323583 v 0.31142 h -1.691342 z m 0.315833,7.6524 c 0.356876,-0.14916 0.822437,-0.53623 0.968511,-0.80526 0.07231,-0.13321 0.02551,-0.13439 -0.475169,-0.012 -0.984441,0.24062 -1.681127,0.009 -2.306585,-0.76927 -0.26071,-0.32411 -0.295617,-0.44513 -0.339874,-1.17836 l -0.04933,-0.81715 -0.256509,0.30582 c -0.822265,0.98037 -0.459417,2.6469 0.70147,3.22181 0.48908,0.24221 1.251667,0.26583 1.757481,0.0544 z m -1.330485,0.32864 c -0.541904,-0.12922 -0.867149,-0.32727 -1.225662,-0.74633 -0.606112,-0.70845 -0.727348,-1.77669 -0.299201,-2.6363 0.135175,-0.2714 0.322096,-0.53432 0.415381,-0.58427 0.157826,-0.0845 0.159638,-0.11891 0.0261,-0.49524 -0.352113,-0.99233 -0.20943,-2.51608 0.328134,-3.50425 0.328783,-0.60438 1.0431,-1.2434 1.603455,-1.43443 1.115376,-0.38024 2.679607,0.0425 3.461337,0.93534 1.21161,1.38389 1.52834,3.21746 0.81726,4.73098 -0.23868,0.50801 -1.21551,1.49715 -1.92601,1.95027 -0.34353,0.21907 -0.56429,0.44351 -0.67787,0.68916 -0.371437,0.80334 -1.568126,1.32275 -2.522924,1.09507 z m 2.19911,-1.4967 c 0.978664,-0.37204 2.470754,-1.6715 2.795454,-2.43453 0.78312,-1.84035 -0.11926,-4.30442 -1.87124,-5.10964 -0.806242,-0.37056 -1.788981,-0.3857 -2.470056,-0.038 -1.451067,0.74068 -2.106198,2.85414 -1.464365,4.72405 0.0966,0.28145 0.176572,0.77122 0.177715,1.08843 0.0044,1.23212 0.671638,1.94724 1.817915,1.94848 0.305191,3.3e-4 0.749449,-0.0779 1.014577,-0.17873 z" />
<g
id="g1961"
transform="translate(5.7478236e-5,3.0300929e-4)">
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 99.687906,159.96304 c 0.03116,-0.0812 0.399384,-0.2858 0.818354,-0.45477 0.84931,-0.34253 1.0686,-0.3103 1.0686,0.15703 0,0.24663 -0.0628,0.29752 -0.70948,0.57453 -0.86444,0.37031 -0.952978,0.55914 -1.060626,0.26518 -0.107648,-0.29395 -0.14798,-0.46082 -0.116848,-0.54197 z"
id="path1775"
sodipodi:nodetypes="ccsccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="10.999999mm"
height="10.999999mm"
viewBox="0 0 11 10.999999"
version="1.1"
id="svg4576"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="buds_pro_right.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview4578"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-bottom="0"
fit-margin-left="0"
fit-margin-right="0"
inkscape:zoom="11.313709"
inkscape:cx="36.63697"
inkscape:cy="29.831067"
inkscape:window-width="1920"
inkscape:window-height="1035"
inkscape:window-x="0"
inkscape:window-y="45"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true">
<sodipodi:guide
position="1.2413708,6.0162603"
orientation="0,-1"
id="guide34430" />
</sodipodi:namedview>
<defs
id="defs4573" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-85.996183,-154.42373)">
<g
aria-label="R"
id="text28286"
style="font-style:italic;font-size:4.23333px;line-height:124%;font-family:Sans;-inkscape-font-specification:'Sans Italic';letter-spacing:0px;word-spacing:0px;stroke-width:0.299542px"
transform="matrix(0.88023484,0,0,0.88636119,10.922244,18.114874)">
<path
id="path61769"
style="font-size:4.23333px;line-height:124%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;stroke:#000000;stroke-width:0.299542px"
d="m 91.7518,157.96053 q 0.134359,0.0455 0.260449,0.1943 0.128158,0.14883 0.256315,0.40928 l 0.423747,0.84336 h -0.448552 l -0.394807,-0.79169 q -0.152962,-0.31005 -0.297656,-0.41134 -0.142627,-0.10128 -0.390674,-0.10128 H 90.70587 v 1.30431 h -0.417545 v -3.08612 h 0.942577 q 0.529166,0 0.789615,0.22118 0.260449,0.22117 0.260449,0.66766 0,0.29145 -0.136425,0.48369 -0.134359,0.19223 -0.392741,0.26665 z m -1.04593,-1.29605 v 1.09554 h 0.525032 q 0.30179,0 0.454752,-0.13849 0.15503,-0.14056 0.15503,-0.41134 0,-0.27079 -0.15503,-0.40721 -0.152962,-0.1385 -0.454752,-0.1385 z m 1.432917,8.30872 c -0.405432,-0.16828 -0.934338,-0.60499 -1.100286,-0.9085 -0.08215,-0.15028 -0.02898,-0.15162 0.53982,-0.0135 1.118385,0.27146 1.909867,0.0101 2.620416,-0.8679 0.296193,-0.36567 0.335853,-0.50221 0.386124,-1.32944 l 0.05601,-0.92191 0.291411,0.34503 c 0.934148,1.10606 0.521917,2.98625 -0.796913,3.63487 -0.555624,0.27326 -1.421972,0.29991 -1.996603,0.0614 z m -0.98681,-1.31781 c -1.111824,-0.41974 -2.806926,-1.8858 -3.175801,-2.74666 -0.889675,-2.0763 0.135483,-4.85628 2.125836,-5.76475 0.915942,-0.41805 2.032389,-0.43513 2.806137,-0.0429 1.648492,0.83564 2.39276,3.22007 1.663613,5.32971 -0.109743,0.31753 -0.200605,0.8701 -0.2019,1.22797 -0.0057,1.3901 -0.763024,2.1969 -2.065267,2.19829 -0.346714,3.8e-4 -0.851416,-0.0879 -1.152618,-0.20163 z m 2.498327,1.68859 c 0.615631,-0.14579 0.985134,-0.36923 1.392423,-0.84202 0.688578,-0.79928 0.826314,-2.00447 0.33991,-2.97429 -0.153562,-0.3062 -0.365914,-0.60283 -0.471897,-0.65918 -0.179304,-0.0953 -0.181361,-0.13416 -0.02965,-0.55873 0.400029,-1.11956 0.237925,-2.83867 -0.372776,-3.95353 -0.373514,-0.68188 -1.185013,-1.40282 -1.821627,-1.61833 -1.267129,-0.42899 -3.044181,0.048 -3.932276,1.05525 -1.376461,1.56132 -1.736294,3.62997 -0.928459,5.33754 0.271153,0.57314 1.380895,1.68909 2.188066,2.20031 0.390272,0.24715 0.641063,0.50037 0.770097,0.77751 0.421974,0.90634 1.781479,1.49234 2.86619,1.23547 z" />
</g>
<g
id="g3227"
transform="translate(2.1600298e-4,2.9611944e-4)">
<path
style="fill:#000000;stroke:#000000;stroke-width:0.4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 91.29092,160.58104 c -0.03116,-0.0812 -0.399381,-0.2858 -0.818345,-0.45477 -0.849311,-0.34253 -1.068608,-0.31031 -1.068608,0.15703 0,0.24663 0.06281,0.29752 0.709484,0.57453 0.864443,0.37031 0.947778,0.40745 1.058024,0.18934 0.110245,-0.21811 0.150577,-0.38498 0.119445,-0.46613 z"
id="path3121"
sodipodi:nodetypes="cssccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg2"
width="28.740126"
height="28.740126"
viewBox="0 0 28.740126 28.740126"
sodipodi:docname="ic_device_galaxy_buds_pro.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 14.370063 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="28.740126 : 14.370063 : 1"
inkscape:persp3d-origin="14.370063 : 9.580042 : 1"
id="perspective903" />
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1035"
id="namedview4"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="16"
inkscape:cx="9.59375"
inkscape:cy="19.78125"
inkscape:window-x="0"
inkscape:window-y="45"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:pagecheckerboard="0">
<inkscape:grid
type="xygrid"
id="grid972" />
</sodipodi:namedview>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Background"
style="display:inline">
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Bottom"
style="display:inline"
sodipodi:insensitive="true">
<rect
style="display:inline;fill:#1f7fdb;fill-opacity:1;stroke:none;stroke-width:3.57115;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect817-5"
width="22.819572"
height="21.904638"
x="2.9239759"
y="3.8768768"
ry="0.9472276" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Middle"
style="display:inline"
sodipodi:insensitive="true">
<rect
style="display:inline;fill:#4dabf5;fill-opacity:1;stroke:none;stroke-width:3.57115;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect817-7"
width="22.819572"
height="21.904638"
x="2.9317887"
y="3.0349438"
ry="0.9472276" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Top"
style="display:inline"
sodipodi:insensitive="true">
<rect
style="fill:#2196f3;fill-opacity:1;stroke:none;stroke-width:3.57115;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect817"
width="22.819572"
height="21.904638"
x="2.9238882"
y="3.4130721"
ry="0.9472276" />
</g>
<g
id="g63739"
transform="translate(0.05413571,0.02254964)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21.237726,23.178927 c 0.634206,-0.154792 1.014861,-0.392033 1.434432,-0.894023 0.709355,-0.848648 0.851246,-2.128284 0.35017,-3.158004 -0.158194,-0.325102 -0.376956,-0.640059 -0.486135,-0.699886 -0.184713,-0.101225 -0.186831,-0.142449 -0.0305,-0.593252 0.4121,-1.188704 0.245104,-3.013982 -0.384023,-4.197709 -0.384785,-0.723994 -1.220769,-1.489466 -1.876589,-1.718287 -1.305362,-0.455487 -3.136032,0.05098 -4.050919,1.120434 -1.417995,1.657746 -1.788681,3.854161 -0.956476,5.667197 0.279331,0.608544 1.422559,1.793423 2.254089,2.336206 0.402046,0.262429 0.660398,0.531288 0.79333,0.825545 0.434706,0.962313 1.83523,1.584515 2.952669,1.311779 z m -1.557124,-0.393681 c -0.417663,-0.178671 -0.962525,-0.642359 -1.13348,-0.964615 -0.08464,-0.159567 -0.02985,-0.160978 0.556108,-0.01438 1.152123,0.288237 1.967488,0.0109 2.699481,-0.921499 0.305122,-0.388252 0.34598,-0.533223 0.397766,-1.411541 l 0.05768,-0.978857 0.300204,0.366331 c 0.962332,1.174379 0.537663,3.170699 -0.820959,3.859379 -0.572392,0.290149 -1.464875,0.318438 -2.056846,0.0651 z M 18.664017,21.38604 c -1.145368,-0.445668 -2.891616,-2.002277 -3.271619,-2.916302 -0.916517,-2.204544 0.139572,-5.156228 2.189977,-6.12081 0.943576,-0.443884 2.09371,-0.462014 2.890806,-0.04544 1.698228,0.887254 2.464953,3.418948 1.713805,5.658899 -0.113052,0.337133 -0.206657,0.923837 -0.207992,1.30381 -0.0056,1.475953 -0.786045,2.332595 -2.127581,2.334067 -0.357171,4.12e-4 -0.877106,-0.09332 -1.187396,-0.214086 z m 0.05143,-2.660283 c 0.09413,-0.1471 0.141331,-0.346993 0.104904,-0.444199 -0.03648,-0.09727 -0.46741,-0.342356 -0.95774,-0.544765 -0.99398,-0.410316 -1.250633,-0.37172 -1.250633,0.188105 0,0.29544 0.0735,0.356398 0.830335,0.688221 1.011691,0.443601 1.058716,0.44776 1.273129,0.112618 z"
id="path4913" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#fffffd;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 7.8095555,17.66233 c -0.643309,-0.154792 -1.029417,-0.392034 -1.455018,-0.894023 -0.719533,-0.848647 -0.863456,-2.128283 -0.35519,-3.158003 0.16047,-0.325108 0.382369,-0.640058 0.493111,-0.699893 0.187359,-0.101222 0.189511,-0.142441 0.03099,-0.593244 -0.418003,-1.188704 -0.24862,-3.0139926 0.389538,-4.1977137 0.390307,-0.7239821 1.238294,-1.4894593 1.903507,-1.7182926 1.3240955,-0.4554866 3.1810385,0.05091 4.1090525,1.1204365 1.438337,1.6577511 1.814337,3.8541708 0.970193,5.6672038 -0.283344,0.608542 -1.442967,1.793425 -2.286421,2.336214 -0.407815,0.262422 -0.669885,0.531277 -0.804719,0.825539 -0.440944,0.962315 -1.8615685,1.584512 -2.9950365,1.311776 z m 1.579457,-0.393675 c 0.423658,-0.178678 0.9763395,-0.642346 1.1497485,-0.964615 0.08584,-0.159571 0.03028,-0.160985 -0.5640875,-0.01437 -1.168658,0.288237 -1.995714,0.01078 -2.738213,-0.921502 -0.309496,-0.388249 -0.350936,-0.533218 -0.403474,-1.411549 l -0.05856,-0.978857 -0.30451,0.366339 c -0.976134,1.174378 -0.545387,3.170701 0.832735,3.859381 0.580601,0.290142 1.48589,0.318436 2.086356,0.06516 z m 1.0311705,-1.39921 c 1.1618,-0.445664 2.933103,-2.002277 3.318564,-2.916305 C 14.668411,10.748599 13.59717,7.7969088 11.517344,6.832342 10.560231,6.3884511 9.3935935,6.370315 8.5850695,6.786822 c -1.722603,0.8872548 -2.500328,3.418952 -1.73839,5.658903 0.114677,0.337147 0.209614,0.923838 0.210971,1.303822 0.0052,1.475947 0.79732,2.332583 2.158099,2.334069 0.362301,3.8e-4 0.8896925,-0.09332 1.2044335,-0.214099 z m -0.05212,-2.660279 c -0.09548,-0.147102 -0.14336,-0.346994 -0.106402,-0.444203 0.03699,-0.09727 0.47412,-0.342357 0.971491,-0.544765 1.008241,-0.410314 1.268566,-0.371706 1.268566,0.188105 0,0.295436 -0.07455,0.356397 -0.842244,0.688225 -1.026201,0.443591 -1.073911,0.44776 -1.291402,0.112602 z"
id="path4913-6" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="Original"
style="display:none"
sodipodi:insensitive="true">
<image
y="0.0079936879"
x="0.010951031"
id="image4124"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAA3NCSVQICAjb4U/gAAAACXBIWXMA ADFOAAAxTgGacD5yAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAABF0RVh0 VGl0bGUAUGViYmxlIEljb26KvwD9AAAADHRFWHRBdXRob3IAeHBobnh/4OzMAAAAY3RFWHRDb3B5 cmlnaHQAQ0MgQXR0cmlidXRpb24tTm9uQ29tbWVyY2lhbC1TaGFyZUFsaWtlIGh0dHA6Ly9jcmVh dGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC/eBBrlAAABy1BMVEUAAAAAAAAA AP8AAIAAAFUAAKoAVaoAAIAAQIAAM2YAM5kzM2YzM5krK4AkJG0kJJIgIIAcHHEcHI4aGoAXF3QX F4sXLnQXLosVK4AUJ3YUJ4kSJIAkJIARInciInciIogQIIAgIIAeHngeHoccHIAcK4AbKHkbKIYa GoAaJoAYJHkXI4AXI4sWIXoWIYUVIIAfH3ofH4UdJ4ATHIQcJnsbJIAaI4QaIoAZIXsZIYQYIHgY IIAXH4MXJ3wXHoAXJoBLpfAWJHwdJHwdJIMcI4Acas0VIoMbIoAaIXwaIIAZH3wZH4MZJXwYHoAY HoYYJIAehtsYHoIefdtHoO0jetZGovNEn+4gg+EfgN5Ep/VKqfREpvQgfdkgfttKqvQggd4hjesw nPMwnPRJqfUhgd4hjutJqfUgfttNq/VNq/QhlPEhlPIhlvMkmPMglvIff9sgjeoglPAhk/AhlPEh lPIhlvMkl/MkmPMlmPMmmPMnmfMpmvMzn/Q0n/Q1n/Q2oPRIqfVNq/VasfZbsvZhtPZitfdtuveQ yvmXzvmj0/qk1Pqu2fu83/vR6f3T6v3Z7f3i8f3j8v3l8/7m8/7p9f7q9f7x+P7y+f7////ougeB AAAAb3RSTlMAAQECAwMDBAQFBQUFBgcHCAkJCgsLCwsMDQ0ODg8PDxAQERESEhMTFBQVFhYXFxgZ GRobGxwdHh8fICAhISIiIiMjIyQkJSYnKCkpKSoqKiorKyssLC2xs7O0tba2tu7u7u7u7+/w8fHy +/v7+/ywJhX9AAAC0klEQVRo3u2a+VfTQBCAm00iW0nSTVNKbKQYbIMUC6jU4q2IB2rF+74vPEAR LSjIIXgAAiqef65py6MNJe17y1RF8/26L/N1N9O8ZGZcLof/DiYFoiV1cZHwiGVZjh7zalRAYYbn sFsQ6RFwGccyBeJjwSMrPn8lHX6fQqRy3tbAsFiU1So9FA4bNIRD63XNTwTO5pSYc9fuvwbgwaW9 SxqYs/eGBgcAGBy+fRrlpRPDsJdfJoEYuMgvzibz/vK3kmDcFMuxNZvM/BG74QTdFV6PJZsYlhe9 XXCCrlCVStwcyhG45QCkoCmiV0o4uwXEib4aQMHjbc0RTXYvCMx/mGdNHaSgraWxRhEXzsgUEC0C KWjfszlUYRWsrYcUHGttNlSRzxUEo5CCjrZYrSqVVlD3Nwj6vqcZsovzKrPeTy3o/5lmxE4wnFl/ 4QhKLvjy2YY5IEExHMH0B1umQQSj9o+EUUewIBh/m8c4qOBbfu58dQRLCmYnJmZLKphKJicdwR8X vJsymSmhIM37FSv4OJlhxnlUOAJHAC8Ye5PHmPNe9PsEJX/5dT5AigvmPtkw53wnr3xB34809uWc zDp9OWflV7xgBaBlzY79MWORALhuui+vbhoArfwe3rUp5MtWfl2Il1QDUtAaj+rKakv1XdEhBfGm Wo1kq+/pM1Ih+wdRI6iIq3IFvEAewgke6QHFg1mU26PjhbtwghsKEbG1X8ew3PmnUPGfXRAwv7hr yqAD13t6nwPQ23PnBMeivG4gg85c7XwCQOeVU+avZ5bslcrrNm7dfehIInGSguOJo+0Hd27ZoOam j3ULvOjTI02x+PYddLTEY42GJpfnpo/L0g50k8pqI1IfbWikoSFaXxfSFKnMrqFsZpKbKKoWDFbT EdQCqlfCdhtIG7AoESLTQogk4EJd/VRTn8fLgecKTg3MjyUsA4SKDD7MT1bQ8++NmvwCRmydh2Fg UvEAAAAASUVORK5CYII= "
style="opacity:0.49074079;image-rendering:optimizeQuality"
preserveAspectRatio="none"
height="28.710279"
width="28.710279" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -139,8 +139,25 @@ public class DeviceSettingsPreferenceConst {
public static final String PREF_GALAXY_BUDS_EQUALIZER_MODE = "pref_galaxy_buds_equalizer_mode";
public static final String PREF_GALAXY_BUDS_TOUCH_LEFT = "pref_galaxy_buds_touch_left";
public static final String PREF_GALAXY_BUDS_TOUCH_RIGHT = "pref_galaxy_buds_touch_right";
public static final String PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH = "pref_galaxy_buds_touch_right_switch";
public static final String PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH = "pref_galaxy_buds_touch_left_switch";
public static final String PREF_GALAXY_BUDS_LIVE_ANC = "pref_galaxy_buds_live_anc";
public static final String PREF_GALAXY_BUDS_PRESSURE_RELIEF = "pref_galaxy_buds_live_pressure_relief";
public static final String PREF_GALAXY_BUDS_AMBIENT_SOUND = "pref_galaxy_buds_ambient_sound";
public static final String PREF_GALAXY_BUDS_PRO_NOISE_CONTROL="pref_galaxy_buds_pro_noise_control";
public static final String PREF_GALAXY_PRO_DOUBLE_TAP_EDGE ="pref_galaxy_pro_double_tap_edge";
public static final String PREF_GALAXY_BUDS_PRO_IN_EAR_DETECTION ="pref_galaxy_buds_pro_in_ear_detection";
public static final String PREF_GALAXY_BUDS_PRO_VOICE_DETECT ="pref_galaxy_buds_pro_voice_detect";
public static final String PREF_GALAXY_BUDS_PRO_VOICE_DETECT_DURATION ="pref_galaxy_buds_pro_voice_detect_duration";
public static final String PREF_GALAXY_BUDS_PRO_BALANCE="pref_galaxy_buds_pro_balance";
public static final String PREF_GALAXY_BUDS_PRO_READ_NOTIFICATIONS_OUTLOUD ="pref_galaxy_buds_pro_read_notifications_outloud";
public static final String PREF_GALAXY_BUDS_AMBIENT_MODE_DURING_CALL ="pref_galaxy_buds_ambient_mode_during_call";
public static final String PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_RIGHT ="pref_galaxy_buds_pro_ambient_volume_right";
public static final String PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_LEFT="pref_galaxy_buds_pro_ambient_volume_left";
public static final String PREF_GALAXY_BUDS_PRO_AMBIENT_SOUND_TONE ="pref_galaxy_buds_pro_ambient_sound_tone";
public static final String PREFS_NOISE_CONTROL_WITH_ONE_EARBUD ="pref_galaxy_buds_noise_controls_with_one_earbud";
public static final String PREF_GALAXY_BUDS_PRO_ANC_LEVEL="pref_galaxy_buds_pro_anc_level";
public static final String PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION="prefs_galaxy_buds_seamless_connection";
public static final String PREF_SONY_AUDIO_CODEC = "pref_sony_audio_codec";
public static final String PREF_SONY_AMBIENT_SOUND_CONTROL = "pref_sony_ambient_sound_control";

View File

@ -21,6 +21,7 @@ import android.os.Parcelable;
import androidx.preference.Preference;
import java.util.Set;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
/**
* A device-specific preference handler, that allows for concrete implementations to customize the preferences in
@ -37,10 +38,10 @@ public interface DeviceSpecificSettingsCustomizer extends Parcelable {
/**
* Customize the settings on the {@link DeviceSpecificSettingsFragment}.
*
* @param handler the {@link DeviceSpecificSettingsHandler}
* @param prefs the {@link android.content.SharedPreferences}
*/
void customizeSettings(final DeviceSpecificSettingsHandler handler);
void customizeSettings(final DeviceSpecificSettingsHandler handler, Prefs prefs);
/**
* Keys of preferences which should print its values as a summary below the preference name.

View File

@ -431,7 +431,6 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
addPreferenceHandlerFor(PREF_NOTHING_EAR1_INEAR);
addPreferenceHandlerFor(PREF_NOTHING_EAR1_AUDIOMODE);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_MODE);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_VOICE_FOCUS);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_VOLUME);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_LOCK_TOUCH);
@ -443,6 +442,23 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
addPreferenceHandlerFor(PREF_GALAXY_BUDS_TOUCH_RIGHT);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_LIVE_ANC);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRESSURE_RELIEF);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_ANC_LEVEL);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_SOUND);
addPreferenceHandlerFor(PREF_GALAXY_PRO_DOUBLE_TAP_EDGE);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_IN_EAR_DETECTION);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_VOICE_DETECT);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_VOICE_DETECT_DURATION);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_BALANCE);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_READ_NOTIFICATIONS_OUTLOUD);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_MODE_DURING_CALL);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_RIGHT);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_LEFT);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRO_AMBIENT_SOUND_TONE);
addPreferenceHandlerFor(PREFS_NOISE_CONTROL_WITH_ONE_EARBUD);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_AMBIENT_MODE);
addPreferenceHandlerFor(PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH);
addPreferenceHandlerFor(PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH);
addPreferenceHandlerFor(PREF_SONY_AMBIENT_SOUND_CONTROL);
addPreferenceHandlerFor(PREF_SONY_FOCUS_VOICE);
@ -731,7 +747,7 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
}
if (deviceSpecificSettingsCustomizer != null) {
deviceSpecificSettingsCustomizer.customizeSettings(this);
deviceSpecificSettingsCustomizer.customizeSettings(this, prefs);
}
}

View File

@ -1,26 +1,14 @@
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import nodomain.freeyourgadget.gadgetbridge.GBException;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.model.BatteryConfig;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
public class GalaxyBudsDeviceCoordinator extends AbstractDeviceCoordinator {
public class GalaxyBudsDeviceCoordinator extends GalaxyBudsGenericCoordinator {
@NonNull
@Override
@ -53,100 +41,6 @@ public class GalaxyBudsDeviceCoordinator extends AbstractDeviceCoordinator {
return new BatteryConfig[]{battery1, battery2};
}
@Override
public int getBondingStyle() {
return BONDING_STYLE_BOND;
}
@Nullable
@Override
public Class<? extends Activity> getPairingActivity() {
return null;
}
@Override
public boolean supportsActivityDataFetching() {
return false;
}
@Override
public boolean supportsActivityTracking() {
return false;
}
@Override
public SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice
device, DaoSession session) {
return null;
}
@Override
public InstallHandler findInstallHandler(Uri uri, Context context) {
return null;
}
@Override
public boolean supportsScreenshots() {
return false;
}
@Override
public int getAlarmSlotCount() {
return 0;
}
@Override
public boolean supportsSmartWakeup(GBDevice device) {
return false;
}
@Override
public boolean supportsHeartRateMeasurement(GBDevice device) {
return false;
}
@Override
public String getManufacturer() {
return "Samsung";
}
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
@Override
public boolean supportsCalendarEvents() {
return false;
}
@Override
public boolean supportsRealtimeData() {
return false;
}
@Override
public boolean supportsWeather() {
return false;
}
@Override
public boolean supportsFindDevice() {
return true;
}
@Override
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device
device, @NonNull DaoSession session) throws GBException {
}
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
return new int[]{

View File

@ -0,0 +1,114 @@
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import nodomain.freeyourgadget.gadgetbridge.GBException;
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
public abstract class GalaxyBudsGenericCoordinator extends AbstractDeviceCoordinator {
@Override
public int getBondingStyle() {
return BONDING_STYLE_BOND;
}
@Nullable
@Override
public Class<? extends Activity> getPairingActivity() {
return null;
}
@Override
public boolean supportsActivityDataFetching() {
return false;
}
@Override
public boolean supportsActivityTracking() {
return false;
}
@Override
public SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice
device, DaoSession session) {
return null;
}
@Override
public InstallHandler findInstallHandler(Uri uri, Context context) {
return null;
}
@Override
public boolean supportsScreenshots() {
return false;
}
@Override
public int getAlarmSlotCount() {
return 0;
}
@Override
public boolean supportsSmartWakeup(GBDevice device) {
return false;
}
@Override
public boolean supportsHeartRateMeasurement(GBDevice device) {
return false;
}
@Override
public String getManufacturer() {
return "Samsung";
}
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
@Override
public boolean supportsCalendarEvents() {
return false;
}
@Override
public boolean supportsRealtimeData() {
return false;
}
@Override
public boolean supportsWeather() {
return false;
}
@Override
public boolean supportsFindDevice() {
return true;
}
@Override
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device
device, @NonNull DaoSession session) throws GBException {
}
}

View File

@ -1,26 +1,14 @@
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import nodomain.freeyourgadget.gadgetbridge.GBException;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.model.BatteryConfig;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
public class GalaxyBudsLiveDeviceCoordinator extends AbstractDeviceCoordinator {
public class GalaxyBudsLiveDeviceCoordinator extends GalaxyBudsGenericCoordinator {
@NonNull
@Override
@ -54,99 +42,6 @@ public class GalaxyBudsLiveDeviceCoordinator extends AbstractDeviceCoordinator {
return new BatteryConfig[]{battery1, battery2, battery3};
}
@Override
public int getBondingStyle() {
return BONDING_STYLE_BOND;
}
@Nullable
@Override
public Class<? extends Activity> getPairingActivity() {
return null;
}
@Override
public boolean supportsActivityDataFetching() {
return false;
}
@Override
public boolean supportsActivityTracking() {
return false;
}
@Override
public SampleProvider<? extends ActivitySample> getSampleProvider(GBDevice
device, DaoSession session) {
return null;
}
@Override
public InstallHandler findInstallHandler(Uri uri, Context context) {
return null;
}
@Override
public boolean supportsScreenshots() {
return false;
}
@Override
public int getAlarmSlotCount() {
return 0;
}
@Override
public boolean supportsSmartWakeup(GBDevice device) {
return false;
}
@Override
public boolean supportsHeartRateMeasurement(GBDevice device) {
return false;
}
@Override
public String getManufacturer() {
return "Samsung";
}
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
@Override
public boolean supportsCalendarEvents() {
return false;
}
@Override
public boolean supportsRealtimeData() {
return false;
}
@Override
public boolean supportsWeather() {
return false;
}
@Override
public boolean supportsFindDevice() {
return true;
}
@Override
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device
device, @NonNull DaoSession session) throws GBException {
}
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {

View File

@ -0,0 +1,57 @@
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
import androidx.annotation.NonNull;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsCustomizer;
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesSettingsCustomizer;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.BatteryConfig;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
public class GalaxyBudsProDeviceCoordinator extends GalaxyBudsGenericCoordinator {
@NonNull
@Override
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
String name = candidate.getName();
if (name != null && (
name.startsWith("Galaxy Buds Pro (")
)) {
return DeviceType.GALAXY_BUDS_PRO;
}
return DeviceType.UNKNOWN;
}
@Override
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
return new GalaxyBudsSettingsCustomizer(device);
}
@Override
public DeviceType getDeviceType() {
return DeviceType.GALAXY_BUDS_PRO;
}
@Override
public int getBatteryCount() {
return 3;
}
@Override
public BatteryConfig[] getBatteryConfig() {
BatteryConfig battery1 = new BatteryConfig(0, R.drawable.ic_buds_pro_case, R.string.battery_case);
BatteryConfig battery2 = new BatteryConfig(1, R.drawable.ic_buds_pro_left, R.string.left_earbud);
BatteryConfig battery3 = new BatteryConfig(2, R.drawable.ic_buds_pro_right, R.string.right_earbud);
return new BatteryConfig[]{battery1, battery2, battery3};
}
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
return new int[]{
R.xml.devicesettings_galaxy_buds_pro,
};
}
}

View File

@ -0,0 +1,241 @@
/* Copyright (C) 2021 José Rebelo
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOLUME;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_BALANCE;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_NOISE_CONTROL;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_RIGHT;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH;
import android.os.Parcel;
import androidx.preference.Preference;
import java.util.Collections;
import java.util.Set;
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsCustomizer;
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
public class GalaxyBudsSettingsCustomizer implements DeviceSpecificSettingsCustomizer {
final GBDevice device;
public GalaxyBudsSettingsCustomizer(final GBDevice device) {
this.device = device;
}
@Override
public void onPreferenceChange(final Preference preference, final DeviceSpecificSettingsHandler handler) {
}
@Override
public void customizeSettings(final DeviceSpecificSettingsHandler handler, Prefs prefs) {
final Preference pref_galaxy_buds_pro_balance = handler.findPreference(PREF_GALAXY_BUDS_PRO_BALANCE);
if (pref_galaxy_buds_pro_balance != null) {
pref_galaxy_buds_pro_balance.setSummary(String.valueOf((prefs.getInt(PREF_GALAXY_BUDS_PRO_BALANCE, 16) - 16)));
pref_galaxy_buds_pro_balance.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newVal) {
String newValue = String.valueOf((int) newVal - 16);
pref_galaxy_buds_pro_balance.setSummary(newValue);
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_PRO_BALANCE);
return true;
}
});
}
final Preference pref_galaxy_buds_pro_noise_control = handler.findPreference(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL);
String pref_galaxy_buds_pro_noise_control_value = prefs.getString(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL, "0");
final Preference pref_galaxy_buds_pro_anc_level = handler.findPreference(PREF_GALAXY_BUDS_PRO_ANC_LEVEL);
final Preference pref_galaxy_buds_ambient_volume = handler.findPreference(PREF_GALAXY_BUDS_AMBIENT_VOLUME);
if (pref_galaxy_buds_pro_noise_control != null) {
switch (pref_galaxy_buds_pro_noise_control_value) {
case "0":
pref_galaxy_buds_pro_anc_level.setEnabled(false);
pref_galaxy_buds_ambient_volume.setEnabled(false);
break;
case "1":
pref_galaxy_buds_pro_anc_level.setEnabled(true);
pref_galaxy_buds_ambient_volume.setEnabled(false);
break;
case "2":
pref_galaxy_buds_pro_anc_level.setEnabled(false);
pref_galaxy_buds_ambient_volume.setEnabled(true);
break;
}
pref_galaxy_buds_pro_noise_control.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newVal) {
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL);
switch (newVal.toString()) {
case "0":
pref_galaxy_buds_pro_anc_level.setEnabled(false);
pref_galaxy_buds_ambient_volume.setEnabled(false);
break;
case "1":
pref_galaxy_buds_pro_anc_level.setEnabled(true);
pref_galaxy_buds_ambient_volume.setEnabled(false);
break;
case "2":
pref_galaxy_buds_pro_anc_level.setEnabled(false);
pref_galaxy_buds_ambient_volume.setEnabled(true);
break;
}
return true;
}
});
}
final Preference pref_galaxy_buds_touch_right = handler.findPreference(PREF_GALAXY_BUDS_TOUCH_RIGHT);
String pref_galaxy_buds_touch_right_value = prefs.getString(PREF_GALAXY_BUDS_TOUCH_RIGHT, "1");
final Preference pref_galaxy_buds_touch_right_switch = handler.findPreference(PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH);
if (pref_galaxy_buds_touch_right != null) {
switch (pref_galaxy_buds_touch_right_value) {
case "2":
pref_galaxy_buds_touch_right_switch.setEnabled(true);
break;
default:
pref_galaxy_buds_touch_right_switch.setEnabled(false);
}
pref_galaxy_buds_touch_right.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newVal) {
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_TOUCH_RIGHT);
switch (newVal.toString()) {
case "2":
pref_galaxy_buds_touch_right_switch.setEnabled(true);
break;
default:
pref_galaxy_buds_touch_right_switch.setEnabled(false);
}
return true;
}
});
}
final Preference pref_galaxy_buds_touch_left = handler.findPreference(PREF_GALAXY_BUDS_TOUCH_LEFT);
String pref_galaxy_buds_touch_left_value = prefs.getString(PREF_GALAXY_BUDS_TOUCH_LEFT, "1");
final Preference pref_galaxy_buds_touch_left_switch = handler.findPreference(PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH);
if (pref_galaxy_buds_touch_left != null) {
switch (pref_galaxy_buds_touch_left_value) {
case "2":
pref_galaxy_buds_touch_left_switch.setEnabled(true);
break;
default:
pref_galaxy_buds_touch_left_switch.setEnabled(false);
}
pref_galaxy_buds_touch_left.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newVal) {
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_TOUCH_LEFT);
switch (newVal.toString()) {
case "2":
pref_galaxy_buds_touch_left_switch.setEnabled(true);
break;
default:
pref_galaxy_buds_touch_left_switch.setEnabled(false);
}
return true;
}
});
}
/*
final Preference pref_galaxy_buds_ambient_mode = handler.findPreference(PREF_GALAXY_BUDS_AMBIENT_SOUND);
boolean is_pref_galaxy_buds_ambient_mode_enabled = prefs.getBoolean(PREF_GALAXY_BUDS_AMBIENT_SOUND, false);
final Preference pref_galaxy_buds_ambient_voice_focus_preference = handler.findPreference(PREF_GALAXY_BUDS_AMBIENT_VOICE_FOCUS_PREFERENCE);
if (pref_galaxy_buds_ambient_mode != null) {
if (is_pref_galaxy_buds_ambient_mode_enabled) {
pref_galaxy_buds_ambient_voice_focus_preference.setEnabled(true);
} else {
pref_galaxy_buds_ambient_voice_focus_preference.setEnabled(false);
}
pref_galaxy_buds_ambient_mode.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newVal) {
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_AMBIENT_SOUND);
if ((boolean) newVal) {
pref_galaxy_buds_ambient_voice_focus_preference.setEnabled(true);
} else {
pref_galaxy_buds_ambient_voice_focus_preference.setEnabled(false);
}
return true;
}
});
}
*/
}
@Override
public Set<String> getPreferenceKeysWithSummary() {
return Collections.emptySet();
}
public static final Creator<GalaxyBudsSettingsCustomizer> CREATOR = new Creator<GalaxyBudsSettingsCustomizer>() {
@Override
public GalaxyBudsSettingsCustomizer createFromParcel(final Parcel in) {
final GBDevice device = in.readParcelable(GalaxyBudsSettingsCustomizer.class.getClassLoader());
return new GalaxyBudsSettingsCustomizer(device);
}
@Override
public GalaxyBudsSettingsCustomizer[] newArray(final int size) {
return new GalaxyBudsSettingsCustomizer[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(final Parcel dest, final int flags) {
dest.writeParcelable(device, 0);
}
}

View File

@ -18,7 +18,6 @@ package nodomain.freeyourgadget.gadgetbridge.devices.huami;
import android.os.Parcel;
import android.text.InputType;
import android.widget.Toast;
import androidx.preference.Preference;
@ -31,6 +30,7 @@ import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpec
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiVibrationPatternNotificationType;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
public class HuamiSettingsCustomizer implements DeviceSpecificSettingsCustomizer {
final GBDevice device;
@ -45,7 +45,7 @@ public class HuamiSettingsCustomizer implements DeviceSpecificSettingsCustomizer
}
@Override
public void customizeSettings(final DeviceSpecificSettingsHandler handler) {
public void customizeSettings(final DeviceSpecificSettingsHandler handler, Prefs prefs) {
for (HuamiVibrationPatternNotificationType notificationType : HuamiVibrationPatternNotificationType.values()) {
final String typeKey = notificationType.name().toLowerCase(Locale.ROOT);

View File

@ -59,6 +59,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.prefs.Ambien
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.protocol.impl.v1.params.NoiseCancellingOptimizerStatus;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
public class SonyHeadphonesSettingsCustomizer implements DeviceSpecificSettingsCustomizer {
private ProgressDialog ancOptimizerProgressDialog;
@ -116,7 +117,7 @@ public class SonyHeadphonesSettingsCustomizer implements DeviceSpecificSettingsC
}
@Override
public void customizeSettings(final DeviceSpecificSettingsHandler handler) {
public void customizeSettings(final DeviceSpecificSettingsHandler handler, Prefs prefs) {
// Only enable the focus on voice check and voice level slider if the ambient sound control mode is ambient sound
final ListPreference ambientSoundControl = handler.findPreference(PREF_SONY_AMBIENT_SOUND_CONTROL);

View File

@ -103,6 +103,7 @@ public enum DeviceType {
UM25(350, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_um25),
DOMYOS_T540(400, R.drawable.ic_device_lovetoy, R.drawable.ic_device_lovetoy_disabled, R.string.devicetype_domyos_t540),
NOTHING_EAR1(410, R.drawable.ic_device_nothingear, R.drawable.ic_device_nothingear_disabled, R.string.devicetype_nothingear1),
GALAXY_BUDS_PRO(418, R.drawable.ic_device_galaxy_buds_pro, R.drawable.ic_device_galaxy_buds_pro_disabled, R.string.devicetype_galaxybuds_pro),
GALAXY_BUDS_LIVE(419, R.drawable.ic_device_galaxy_buds_live, R.drawable.ic_device_galaxy_buds_live_disabled, R.string.devicetype_galaxybuds_live),
GALAXY_BUDS(420, R.drawable.ic_device_galaxy_buds, R.drawable.ic_device_galaxy_buds_disabled, R.string.devicetype_galaxybuds),
SONY_WH_1000XM3(430, R.drawable.ic_device_sony_overhead, R.drawable.ic_device_sony_overhead_disabled, R.string.devicetype_sony_wh_1000xm3),

View File

@ -380,6 +380,9 @@ public class DeviceSupportFactory {
case GALAXY_BUDS_LIVE:
deviceSupport = new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;
case GALAXY_BUDS_PRO:
deviceSupport = new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;
case SONY_WH_1000XM3:
deviceSupport = new ServiceDeviceSupport(new SonyHeadphonesSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;

View File

@ -31,7 +31,8 @@ public class GalaxyBudsIOThread extends BtClassicIoThread {
if (gbDevice.getType().equals(DeviceType.GALAXY_BUDS)) {
return galaxyBudsProtocol.UUID_GALAXY_BUDS_DEVICE_CTRL;
}
if (gbDevice.getType().equals(DeviceType.GALAXY_BUDS_LIVE)) {
if (gbDevice.getType().equals(DeviceType.GALAXY_BUDS_LIVE)
|| gbDevice.getType().equals(DeviceType.GALAXY_BUDS_PRO)) {
return galaxyBudsProtocol.UUID_GALAXY_BUDS_LIVE_DEVICE_CTRL;
}
return galaxyBudsProtocol.UUID_GALAXY_BUDS_DEVICE_CTRL;

View File

@ -8,6 +8,8 @@ import android.content.SharedPreferences;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
@ -16,7 +18,6 @@ import java.util.List;
import java.util.UUID;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventBatteryInfo;
@ -32,18 +33,19 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
final UUID UUID_GALAXY_BUDS_DEVICE_CTRL = UUID.fromString("00001102-0000-1000-8000-00805f9b34fd");
final UUID UUID_GALAXY_BUDS_LIVE_DEVICE_CTRL = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
private static final byte SOMBuds = (byte) 0xFE;
private static final byte EOMBuds = (byte) 0xEE;
private static final byte SOMPlus = (byte) 0xFD;
private static final byte EOMPlus = (byte) 0xDD;
private static final byte SOM_BUDS = (byte) 0xFE;
private static final byte EOM_BUDS = (byte) 0xEE;
private static final byte SOM_BUDS_PLUS = (byte) 0xFD;
private static final byte EOM_BUDS_PLUS = (byte) 0xDD;
private byte SOM = SOMBuds;
private byte EOM = EOMBuds;
private byte StartOfMessage = SOM_BUDS;
private byte EndOfMessage = EOM_BUDS;
private boolean isFirstExchange = true;
//incoming
private static final byte battery_status = (byte) 0x60;
private static final byte battery_status2 = (byte) 0x61;
//outgoing
@ -52,11 +54,14 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
private static final byte set_ambient_mode = (byte) 0x80; //0x0/0x1
private static final byte set_ambient_volume = (byte) 0x84; // 0x1-0x5
private static final byte set_ambient_voice_focus = (byte) 0x85; // 0x0/0x1
private static final byte set_lock_touch = (byte) 0x90; // 0x0/0x1
private static final byte set_game_mode = (byte) 0x87; // 0x0/0x2 no idea if this is doing anything
private static final byte set_equalizer = (byte) 0x86; // 0x0/0x1
private static final byte set_game_mode = (byte) 0x87; // 0x0/0x2 no idea if this is doing anything...
// this is sent dynamically based on whether the current running app is a game or not
private static final byte set_equalizer = (byte) 0x86;
private static final byte set_reset = (byte) 0x50;
@ -69,9 +74,86 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
//Live
private static final byte set_automatic_noise_cancelling = (byte) 0x98; //0x0/0x1
private static final byte set_live_game_mode = (byte) 0x85; // 0x0/0x1 no idea if this is doing anything
private static final byte set_pressure_relief = (byte) 0x9f; //0x0/0x1
//Live and Pro
private static final byte set_live_pro_game_mode = (byte) 0x85; // 0x0/0x1 no idea if this is doing anything
//Pro
// Comments thanks to phh as per https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/2642#issuecomment-445962
private static final byte set_spatial_audio_control = (byte) 0xc3; //0x0/0x1
// takes a boolean '1' or '0' to enable or disable 360 Audio (probably useless until someone
// manage to send Dolby Atmos to the headset). 360 audio is a feature where (Shown only on Samsung rom)
private static final byte set_outside_double_tap = (byte) 0x95; //0x0/0x1
// This is an option in "Labs", to detect double tap even when not taped on touch pad (so I presume it's using accelerometer)
private static final byte set_adjust_sound_sync = (byte) 0x85; //0x0/0x1
// This is an option in "Labs" available only on Samsung ROM, exposed to the user as "automatic game mode".
// This is used in confunction with GAME_MODE. My guess is that this says to the ear buds
// "yes, I know that the reported latency might change on the fly, I'm fine with that".
private static final byte set_detect_conversations = (byte) 0x7a; //0x0/0x1
// This is called "Voice detect -- Noise controls and sound settings go back to the previous state
// when your voice isn't detected for 10 seconds". This triggers the feature that when you talk,
// the ear buds automatically go into "ambient sound" mode, and enhance the sound of your interlocutor
private static final byte set_detect_conversations_duration = (byte) 0x7b; //0x0/0x1/0x2
// Takes {0,1,2}: 0 means 5 seconds, 1 means 10 seconds, 2 means 15s. This is the duration after
// which the ear buds go back to ANC after switching to ambient sound when the user talks.
private static final byte set_ambient_mode_during_calls = (byte) 0x8b; //0x0/0x1
// "Use ambient sound during calls"
private static final byte set_noise_controls_with_one_earbud = (byte) 0x6f; //0x0/0x1
// "Noise controls with one earbud" in Accessibility menu. I'm not exactly sure what it means,
// my guess is that it allows ANC even if only one earbuds is in-ear
private static final byte set_balance = (byte) 0x8f;
// takes value in 0-32 range, it is used to change left/right balance
private static final byte extra_high_ambient = (byte) 0x96; //0x0/0x1
// "Maximize ambient sound volume"/"Amplify sounds from your surroundings so you can stay aware of what's going on around you.
private static final byte set_seamless_connection = (byte) 0xaf; //0x0/0x1
// It is used to allow the ear buds to roam across devices, like devices being allowed to take ear buds "focus".
private static final byte set_voice_wake_up = (byte) 0x97; //0x0/0x1
// Enables "Hey Bixby" wake up word. Shown only on Samsung ROM
private static final byte set_speak_seamlessly = (byte) 0x7d; //0x0/0x1
// "After Voice wake up, you can say the command you want right away without waiting for sound feedback."
private static final byte voice_wake_up_language = (byte) 0x99;
// Language for "Hey bixby" wakeup - 1 = "de-DE", 2 = "en-GB", 3 = "en-US", 4 = "es-ES", 5 = "fr-FR", 6 = "it-IT", 7 = "ko-KR", 8 = "pt-BR", 9 = "zh-CN"
private static final byte set_voice_noti_status = (byte) 0xa4; //0x0/0x1
// I have no idea why it does that. It sends "1" when it starts reading notification aloud, and "0" when it finished.
private static final byte set_noise_controls = (byte) 0x78; //Takes 0/1/2.
// 0 is Ambient Sound and ANC OFF, 1 is ANC on, 2 is Ambient sound ON
private static final byte set_mute_earbud = (byte) 0xa2;
// Takes two booleans (left then right). This is used in conjuction with FIND_MY_EARBUDS_START to alternate between tweeting the left and the right earbud
private static final byte set_customize_ambient_sound = (byte) 0x82;
//one byte for left volume 0-4, one byte for right volume 0-4, and one byte 0-4 for ambient sound tone from "soft" to "clear"
private static final byte set_noise_reduction_level = (byte) 0x83;
// 1 means High noise reduction, 0 low noise reduction.
private static final byte set_touch_and_hold_noise_controls = (byte) 0x79;
// Takes either 3 booleans or 6 booleans depending on earbuds revision.
// It is used when long press on touchpad is set in SET_TOUCHPAD_OPTION to "Switch noise control",
// to control whether the long press switches between ANC on <=> Ambient sound on, or to anc+ambient off,
// or ambient <=> off or anc <=> off, and when it's 6 bytes, it can have different behavior between right and left earbud.
private static final byte voice_wake_up_event = (byte) 0x9a;
// Just a reponse. It's a ACK for when received "Hey bixby" command ?
private static final byte in_ear_detection = (byte) 0x6e;
@Override
public GBDeviceEvent[] decodeResponse(byte[] responseData) {
List<GBDeviceEvent> devEvts = new ArrayList<>();
@ -90,12 +172,12 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
byte type = 0;
byte sof = incoming.get();
if (sof != SOM) {
if (sof != StartOfMessage) {
LOG.error("Error in message, wrong start of frame: " + hexdump(responseData));
return null;
}
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
length = (int) (incoming.get() & 0xff);
type = incoming.get();
} else {
@ -130,9 +212,9 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
byte[] encodeMessage(byte command) {
ByteBuffer msgBuf = ByteBuffer.allocate(7);
msgBuf.order(ByteOrder.LITTLE_ENDIAN);
msgBuf.put(SOM);
msgBuf.put(StartOfMessage);
byte size = 0x3;
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
msgBuf.put((byte) size);
msgBuf.put((byte) 0x0); //0x0 for sending
} else {
@ -141,7 +223,7 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
}
msgBuf.put((byte) command); //command id
msgBuf.putShort((short) crc16_ccitt(new byte[]{command}));
msgBuf.put(EOM);
msgBuf.put(EndOfMessage);
LOG.debug("DEBUG: " + hexdump(msgBuf.array()));
return msgBuf.array();
}
@ -149,9 +231,9 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
byte[] encodeMessage(byte command, byte parameter) {
ByteBuffer msgBuf = ByteBuffer.allocate(8);
msgBuf.order(ByteOrder.LITTLE_ENDIAN);
msgBuf.put(SOM);
msgBuf.put(StartOfMessage);
byte size = 0x4;
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
msgBuf.put((byte) size);
msgBuf.put((byte) 0x0); //0x0 for sending
} else {
@ -161,7 +243,7 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
msgBuf.put((byte) command); //command id
msgBuf.put((byte) parameter);
msgBuf.putShort((short) crc16_ccitt(new byte[]{command, parameter}));
msgBuf.put(EOM);
msgBuf.put(EndOfMessage);
LOG.debug("DEBUG: " + hexdump(msgBuf.array()));
return msgBuf.array();
}
@ -169,9 +251,9 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
byte[] encodeMessage(byte command, byte parameter, byte value) {
ByteBuffer msgBuf = ByteBuffer.allocate(9);
msgBuf.order(ByteOrder.LITTLE_ENDIAN);
msgBuf.put(SOM);
msgBuf.put(StartOfMessage);
byte size = 0x5;
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
msgBuf.put((byte) size);
msgBuf.put((byte) 0x0); //0x0 for sending
} else {
@ -182,11 +264,43 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
msgBuf.put((byte) parameter);
msgBuf.put((byte) value);
msgBuf.putShort((short) crc16_ccitt(new byte[]{command, parameter, value}));
msgBuf.put(EOM);
msgBuf.put(EndOfMessage);
LOG.debug("DEBUG: " + hexdump(msgBuf.array()));
return msgBuf.array();
}
byte[] encodeMessage(byte command, byte[] payload) {
byte payload_size = (byte) (3 + payload.length);
ByteBuffer msgBuf = ByteBuffer.allocate(4 + payload_size);
msgBuf.order(ByteOrder.LITTLE_ENDIAN);
msgBuf.put(StartOfMessage);
if (StartOfMessage == SOM_BUDS_PLUS) {
msgBuf.put((byte) payload_size);
msgBuf.put((byte) 0x0); //0x0 for sending
} else {
msgBuf.put((byte) 0x0); //0x0 for sending
msgBuf.put((byte) payload_size); //size
}
msgBuf.put((byte) command);
msgBuf.put(payload);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
outputStream.write(command);
outputStream.write(payload);
} catch (IOException e) {
LOG.warn("Assembling message failed: " + e.getMessage());
}
msgBuf.putShort((short) crc16_ccitt(outputStream.toByteArray()));
msgBuf.put(EndOfMessage);
LOG.debug("DEBUG: " + hexdump(msgBuf.array()));
return msgBuf.array();
}
@Override
public byte[] encodeFindDevice(boolean start) {
byte command = (byte) (start ? find_device_start : find_device_stop);
@ -213,23 +327,76 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
SharedPreferences prefs = GBApplication.getDeviceSpecificSharedPrefs(getDevice().getAddress());
switch (config) {
case DeviceSettingsPreferenceConst.PREF_GALAXY_PRO_DOUBLE_TAP_EDGE:
byte outside_double_tap = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_PRO_DOUBLE_TAP_EDGE, false) ? 0x01 : 0x00);
return encodeMessage(set_outside_double_tap, outside_double_tap);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_VOICE_DETECT:
byte detect_conversations = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_VOICE_DETECT, false) ? 0x01 : 0x00);
return encodeMessage(set_detect_conversations, detect_conversations);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_VOICE_DETECT_DURATION:
String voice_detect_duration = prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_VOICE_DETECT_DURATION, "1");
byte voice_detect_duration_b = (byte) Integer.parseInt(voice_detect_duration);
return encodeMessage(set_detect_conversations_duration, voice_detect_duration_b);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_MODE_DURING_CALL:
byte ambient_mode_during_calls = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_MODE_DURING_CALL, false) ? 0x01 : 0x00);
return encodeMessage(set_ambient_mode_during_calls, ambient_mode_during_calls);
case DeviceSettingsPreferenceConst.PREFS_NOISE_CONTROL_WITH_ONE_EARBUD:
byte noise_controls_with_one_earbud = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREFS_NOISE_CONTROL_WITH_ONE_EARBUD, false) ? 0x01 : 0x00);
return encodeMessage(set_noise_controls_with_one_earbud, noise_controls_with_one_earbud);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_IN_EAR_DETECTION:
byte ear_detection = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_IN_EAR_DETECTION, false) ? 0x01 : 0x00);
return encodeMessage(in_ear_detection, ear_detection);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_BALANCE:
int hearing_enhancements = prefs.getInt(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_BALANCE, 16);
return encodeMessage(set_balance, (byte) hearing_enhancements);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_NOISE_CONTROL:
int noise_controls = Integer.parseInt(prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_NOISE_CONTROL, "0"));
return encodeMessage(set_noise_controls, (byte) noise_controls);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL:
int anc_level = Integer.parseInt(prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL, "0"));
return encodeMessage(set_noise_reduction_level, (byte) anc_level);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_SOUND:
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_RIGHT:
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_LEFT:
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_SOUND_TONE:
byte ambient_sound = prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_SOUND, true) ? (byte) 1 : (byte) 0;
int ambient_right = prefs.getInt(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_RIGHT, 1);
int ambient_left = prefs.getInt(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_VOLUME_LEFT, 1);
int sound_tone = prefs.getInt(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_AMBIENT_SOUND_TONE, 1);
return encodeMessage(set_customize_ambient_sound, new byte[]{ambient_sound, (byte) ambient_left, (byte) ambient_right, (byte) sound_tone});
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_MODE:
byte enable_ambient = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_MODE, false) ? 0x01 : 0x00);
return encodeMessage(set_ambient_mode, enable_ambient);
case DeviceSettingsPreferenceConst.PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION:
byte seamless_switch = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION, false) ? 0x01 : 0x00);
return encodeMessage(set_seamless_connection, seamless_switch);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOICE_FOCUS:
byte enable_voice = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOICE_FOCUS, false) ? 0x01 : 0x00);
return encodeMessage(set_ambient_voice_focus, enable_voice);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOLUME:
int ambient_volume = prefs.getInt(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOLUME, 0);
byte ambient_volume_byte = (byte) (ambient_volume + 1); //seek bar is 0-4, we need 1-5
byte ambient_volume_byte = (byte) (ambient_volume);
return encodeMessage(set_ambient_volume, ambient_volume_byte);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_LOCK_TOUCH:
byte set_lock = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_LOCK_TOUCH, false) ? 0x01 : 0x00);
return encodeMessage(set_lock_touch, set_lock);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_GAME_MODE:
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
byte game_mode = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_GAME_MODE, false) ? 0x1 : 0x00);
return encodeMessage(set_live_game_mode, game_mode);
return encodeMessage(set_live_pro_game_mode, game_mode);
} else {
byte game_mode = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_GAME_MODE, false) ? 0x2 : 0x00);
return encodeMessage(set_game_mode, game_mode);
@ -246,7 +413,7 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
}
String equalizer_mode = prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_EQUALIZER_MODE, "0");
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
return encodeMessage(set_equalizer, (byte) (Integer.parseInt(equalizer_mode)));
} else {
byte mode = (byte) (Integer.parseInt(equalizer_mode) + dolby);
@ -261,6 +428,22 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
byte touchmode_right = (byte) Integer.parseInt(touch_right);
return encodeMessage(set_touchpad_options, touchmode_left, touchmode_right);
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH:
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH:
String touch_right_switch = prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_RIGHT_SWITCH, "1");
String touch_left_switch = prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH, "1");
byte[] touch_right_switch_b = encode_touch_switch(touch_right_switch);
byte[] touch_left_switch_b = encode_touch_switch(touch_left_switch);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
outputStream.write(touch_left_switch_b);
outputStream.write(touch_right_switch_b);
} catch (IOException e) {
LOG.warn("Assembling message failed: " + e.getMessage());
}
return encodeMessage(set_touch_and_hold_noise_controls, outputStream.toByteArray());
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_LIVE_ANC:
byte enable_anc = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_LIVE_ANC, false) ? 0x1 : 0x00);
return encodeMessage(set_automatic_noise_cancelling, enable_anc);
@ -304,7 +487,7 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
deviceEvents.add(evBattery2);
if (SOM == SOMPlus) {
if (StartOfMessage == SOM_BUDS_PLUS) {
GBDeviceEventBatteryInfo evBattery3 = new GBDeviceEventBatteryInfo();
// reorder for the non OG version
evBattery1.batteryIndex = 1; //left
@ -320,11 +503,23 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
return deviceEvents;
}
private byte[] encode_touch_switch(String input) {
switch (input) {
case "1":
return new byte[]{0x1, 0x0, 0x1};
case "2":
return new byte[]{0x0, 0x1, 0x1};
default:
return new byte[]{0x1, 0x1, 0x0};
}
}
protected GalaxyBudsProtocol(GBDevice device) {
super(device);
if (device.getType().equals(DeviceType.GALAXY_BUDS_LIVE)) {
SOM = SOMPlus;
EOM = EOMPlus;
if (device.getType().equals(DeviceType.GALAXY_BUDS_LIVE)
|| device.getType().equals(DeviceType.GALAXY_BUDS_PRO)) {
StartOfMessage = SOM_BUDS_PLUS;
EndOfMessage = EOM_BUDS_PLUS;
}
}
}

View File

@ -51,6 +51,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.casio.gbx100.CasioGBX100Devi
import nodomain.freeyourgadget.gadgetbridge.devices.domyos.DomyosT540Cooridnator;
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsLiveDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsProDeviceCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.EXRIZUK8Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.HPlusCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.MakibesF68Coordinator;
@ -323,6 +324,7 @@ public class DeviceHelper {
result.add(new Ear1Coordinator());
result.add(new GalaxyBudsDeviceCoordinator());
result.add(new GalaxyBudsLiveDeviceCoordinator());
result.add(new GalaxyBudsProDeviceCoordinator());
result.add(new VescCoordinator());
result.add(new SonyWH1000XM3Coordinator());
result.add(new SonyWH1000XM4Coordinator());

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="10.399478dp" android:height="10.338884dp" android:tint="#7E7E7E" android:viewportWidth="10.399477" android:viewportHeight="10.338885">
<path android:fillColor="#000000" android:pathData="M2.873 9.063C0.861 8.728-0.35 6.263 0.452 4.14c0.698-1.85 1.22-2.386 2.716-2.793C3.791 1.177 6.401 1.146 7.05 1.3c1.278 0.302 1.887 0.728 2.37 1.655 0.707 1.36 0.896 2.223 0.719 3.275C9.88 7.76 8.846 8.841 7.416 9.075 6.858 9.166 3.437 9.157 2.872 9.063zm4.644-0.155c0.604-0.11 1.305-0.487 1.655-0.887 0.307-0.353 0.686-1.108 0.768-1.532l0.053-0.274-0.229 0.244c-0.332 0.355-0.774 0.623-1.34 0.81-1.136 0.378-5.214 0.387-6.41 0.015C1.456 7.11 0.82 6.728 0.58 6.422L0.417 6.215l0.047 0.274c0.07 0.417 0.462 1.196 0.773 1.54 0.331 0.367 0.958 0.724 1.5 0.856 0.506 0.123 4.14 0.14 4.78 0.023zM8.082 7.24c0.917-0.232 1.683-0.775 1.9-1.348 0.209-0.547-0.02-1.558-0.622-2.756-0.47-0.93-1.06-1.376-2.2-1.665-0.677-0.172-3.41-0.148-4.066 0.036-1.07 0.3-1.649 0.765-2.081 1.677-0.995 2.096-0.885 3.04 0.434 3.73 0.83 0.434 1.469 0.509 4.07 0.476C7.078 7.37 7.711 7.333 8.08 7.24z" android:strokeWidth="0.4" android:strokeColor="#000000"/>
</vector>

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="10.999999dp"
android:height="10.999998dp"
android:tint="#7E7E7E"
android:viewportWidth="11"
android:viewportHeight="10.999998">
<path
android:fillColor="#FF000000"
android:pathData="M4.654 2.265h0.368v2.423h1.324V5H4.654zM4.97 9.917c0.357-0.15 0.823-0.536 0.969-0.805C6.01 8.978 5.964 8.977 5.463 9.1 4.48 9.34 3.784 9.109 3.157 8.33c-0.26-0.324-0.296-0.445-0.34-1.178l-0.05-0.817L2.512 6.64C1.69 7.62 2.051 9.288 3.213 9.862c0.489 0.243 1.251 0.266 1.757 0.055zm-1.33 0.329c-0.542-0.13-0.867-0.328-1.226-0.747-0.606-0.708-0.727-1.776-0.3-2.636C2.25 6.592 2.438 6.329 2.53 6.279c0.158-0.085 0.16-0.12 0.026-0.496-0.352-0.992-0.21-2.516 0.328-3.504 0.33-0.604 1.043-1.243 1.604-1.434 1.115-0.38 2.68 0.042 3.461 0.935 1.212 1.384 1.528 3.218 0.817 4.731C8.528 7.02 7.551 8.008 6.84 8.461c-0.343 0.22-0.564 0.444-0.677 0.69-0.372 0.803-1.569 1.322-2.523 1.095zm2.199-1.497c0.978-0.372 2.47-1.672 2.795-2.435 0.783-1.84-0.119-4.304-1.87-5.11-0.807-0.37-1.79-0.385-2.471-0.037C2.842 1.907 2.187 4.02 2.829 5.89c0.096 0.281 0.176 0.771 0.177 1.088 0.005 1.232 0.672 1.948 1.818 1.949 0.305 0 0.75-0.078 1.015-0.179z"
android:strokeWidth="0.265"
android:strokeColor="#000000" />
<path
android:fillColor="#000000"
android:pathData="M5.705 6.158c0.032-0.082 0.4-0.286 0.819-0.455 0.849-0.343 1.068-0.31 1.068 0.157 0 0.246-0.062 0.297-0.71 0.574-0.864 0.37-0.952 0.56-1.06 0.266-0.107-0.294-0.148-0.461-0.117-0.542z"
android:strokeWidth="0.4"
android:strokeColor="#000000" />
</vector>

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="10.999999dp"
android:height="10.999999dp"
android:tint="#7E7E7E"
android:viewportWidth="11"
android:viewportHeight="10.999999">
<path
android:fillColor="#FF000000"
android:pathData="M5.69 3.701q0.117 0.04 0.228 0.172 0.113 0.132 0.226 0.363l0.373 0.748H6.122L5.775 4.282Q5.64 4.007 5.513 3.917q-0.126-0.09-0.344-0.09h-0.4v1.157H4.4V2.248h0.83q0.466 0 0.695 0.196 0.229 0.196 0.229 0.592 0 0.258-0.12 0.429Q5.917 3.635 5.689 3.7zM4.768 2.552v0.971H5.23q0.265 0 0.4-0.122 0.137-0.125 0.137-0.365T5.63 2.676q-0.135-0.124-0.4-0.124zm1.26 7.365C5.672 9.767 5.206 9.381 5.06 9.112 4.99 8.978 5.036 8.977 5.537 9.1c0.984 0.24 1.68 0.009 2.306-0.77 0.26-0.324 0.296-0.445 0.34-1.178l0.05-0.817 0.256 0.306c0.822 0.98 0.46 2.647-0.702 3.221-0.489 0.243-1.251 0.266-1.757 0.055zM5.162 8.749c-0.978-0.372-2.47-1.672-2.795-2.435-0.783-1.84 0.119-4.304 1.87-5.11 0.807-0.37 1.79-0.385 2.471-0.037 1.45 0.74 2.105 2.853 1.463 4.723-0.096 0.282-0.176 0.77-0.177 1.089-0.005 1.232-0.672 1.947-1.818 1.949-0.305 0-0.75-0.078-1.015-0.18zm2.2 1.497c0.541-0.13 0.866-0.328 1.225-0.747 0.606-0.708 0.727-1.776 0.3-2.636C8.75 6.592 8.562 6.329 8.47 6.279c-0.158-0.085-0.16-0.12-0.026-0.496 0.352-0.992 0.21-2.516-0.328-3.504-0.33-0.604-1.043-1.243-1.604-1.434-1.115-0.38-2.68 0.042-3.461 0.935-1.212 1.384-1.528 3.218-0.817 4.731 0.238 0.508 1.215 1.497 1.926 1.95 0.343 0.22 0.564 0.444 0.677 0.69 0.372 0.803 1.569 1.322 2.523 1.095z"
android:strokeWidth="0.299542"
android:strokeColor="#000000" />
<path
android:fillColor="#000000"
android:pathData="M5.295 6.158c-0.031-0.082-0.4-0.286-0.818-0.455-0.85-0.343-1.069-0.31-1.069 0.157 0 0.246 0.063 0.297 0.71 0.574 0.864 0.37 0.947 0.408 1.058 0.19 0.11-0.218 0.15-0.385 0.119-0.466z"
android:strokeWidth="0.4"
android:strokeColor="#000000" />
</vector>

View File

@ -0,0 +1,31 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="45sp"
android:height="45sp"
android:viewportWidth="30"
android:viewportHeight="30">
<path
android:fillColor="#1f7fdb"
android:pathData="M3.8712,3.8769L24.7963,3.8769A0.9472,0.9472 0,0 1,25.7435 4.8241L25.7435,24.8343A0.9472,0.9472 0,0 1,24.7963 25.7815L3.8712,25.7815A0.9472,0.9472 0,0 1,2.924 24.8343L2.924,4.8241A0.9472,0.9472 0,0 1,3.8712 3.8769z"
android:strokeWidth="3.57115"
android:strokeColor="#00000000" />
<path
android:fillColor="#4dabf5"
android:pathData="M3.879,3.0349L24.8041,3.0349A0.9472,0.9472 0,0 1,25.7514 3.9822L25.7514,23.9924A0.9472,0.9472 0,0 1,24.8041 24.9396L3.879,24.9396A0.9472,0.9472 0,0 1,2.9318 23.9924L2.9318,3.9822A0.9472,0.9472 0,0 1,3.879 3.0349z"
android:strokeWidth="3.57115"
android:strokeColor="#00000000" />
<path
android:fillColor="#2196f3"
android:pathData="M3.8711,3.4131L24.7962,3.4131A0.9472,0.9472 0,0 1,25.7435 4.3603L25.7435,24.3705A0.9472,0.9472 0,0 1,24.7962 25.3177L3.8711,25.3177A0.9472,0.9472 0,0 1,2.9239 24.3705L2.9239,4.3603A0.9472,0.9472 0,0 1,3.8711 3.4131z"
android:strokeWidth="3.57115"
android:strokeColor="#00000000" />
<path
android:fillColor="#ffffff"
android:pathData="m21.2919,23.2015c0.6342,-0.1548 1.0149,-0.392 1.4344,-0.894 0.7094,-0.8486 0.8512,-2.1283 0.3502,-3.158 -0.1582,-0.3251 -0.377,-0.6401 -0.4861,-0.6999 -0.1847,-0.1012 -0.1868,-0.1424 -0.0305,-0.5933 0.4121,-1.1887 0.2451,-3.014 -0.384,-4.1977 -0.3848,-0.724 -1.2208,-1.4895 -1.8766,-1.7183 -1.3054,-0.4555 -3.136,0.051 -4.0509,1.1204 -1.418,1.6577 -1.7887,3.8542 -0.9565,5.6672 0.2793,0.6085 1.4226,1.7934 2.2541,2.3362 0.402,0.2624 0.6604,0.5313 0.7933,0.8255 0.4347,0.9623 1.8352,1.5845 2.9527,1.3118zM19.7347,22.8078c-0.4177,-0.1787 -0.9625,-0.6424 -1.1335,-0.9646 -0.0846,-0.1596 -0.0299,-0.161 0.5561,-0.0144 1.1521,0.2882 1.9675,0.0109 2.6995,-0.9215 0.3051,-0.3883 0.346,-0.5332 0.3978,-1.4115l0.0577,-0.9789 0.3002,0.3663c0.9623,1.1744 0.5377,3.1707 -0.821,3.8594 -0.5724,0.2901 -1.4649,0.3184 -2.0568,0.0651zM18.7182,21.4086c-1.1454,-0.4457 -2.8916,-2.0023 -3.2716,-2.9163 -0.9165,-2.2045 0.1396,-5.1562 2.19,-6.1208 0.9436,-0.4439 2.0937,-0.462 2.8908,-0.0454 1.6982,0.8873 2.465,3.4189 1.7138,5.6589 -0.1131,0.3371 -0.2067,0.9238 -0.208,1.3038 -0.0056,1.476 -0.786,2.3326 -2.1276,2.3341 -0.3572,0.0004 -0.8771,-0.0933 -1.1874,-0.2141zM18.7696,18.7483c0.0941,-0.1471 0.1413,-0.347 0.1049,-0.4442 -0.0365,-0.0973 -0.4674,-0.3424 -0.9577,-0.5448 -0.994,-0.4103 -1.2506,-0.3717 -1.2506,0.1881 0,0.2954 0.0735,0.3564 0.8303,0.6882 1.0117,0.4436 1.0587,0.4478 1.2731,0.1126z"
android:strokeWidth="0.499999"
android:strokeColor="#ffffff" />
<path
android:fillColor="#ffffff"
android:pathData="m7.8637,17.6849c-0.6433,-0.1548 -1.0294,-0.392 -1.455,-0.894 -0.7195,-0.8486 -0.8635,-2.1283 -0.3552,-3.158 0.1605,-0.3251 0.3824,-0.6401 0.4931,-0.6999 0.1874,-0.1012 0.1895,-0.1424 0.031,-0.5932 -0.418,-1.1887 -0.2486,-3.014 0.3895,-4.1977 0.3903,-0.724 1.2383,-1.4895 1.9035,-1.7183 1.3241,-0.4555 3.181,0.0509 4.1091,1.1204 1.4383,1.6578 1.8143,3.8542 0.9702,5.6672 -0.2833,0.6085 -1.443,1.7934 -2.2864,2.3362 -0.4078,0.2624 -0.6699,0.5313 -0.8047,0.8255 -0.4409,0.9623 -1.8616,1.5845 -2.995,1.3118zM9.4431,17.2912c0.4237,-0.1787 0.9763,-0.6423 1.1497,-0.9646 0.0858,-0.1596 0.0303,-0.161 -0.5641,-0.0144 -1.1687,0.2882 -1.9957,0.0108 -2.7382,-0.9215 -0.3095,-0.3882 -0.3509,-0.5332 -0.4035,-1.4115l-0.0586,-0.9789 -0.3045,0.3663c-0.9761,1.1744 -0.5454,3.1707 0.8327,3.8594 0.5806,0.2901 1.4859,0.3184 2.0864,0.0652zM10.4743,15.892c1.1618,-0.4457 2.9331,-2.0023 3.3186,-2.9163C14.7225,10.7711 13.6513,7.8195 11.5715,6.8549 10.6144,6.411 9.4477,6.3929 8.6392,6.8094c-1.7226,0.8873 -2.5003,3.419 -1.7384,5.6589 0.1147,0.3371 0.2096,0.9238 0.211,1.3038 0.0052,1.4759 0.7973,2.3326 2.1581,2.3341 0.3623,0.0004 0.8897,-0.0933 1.2044,-0.2141zM10.4222,13.2317c-0.0955,-0.1471 -0.1434,-0.347 -0.1064,-0.4442 0.037,-0.0973 0.4741,-0.3424 0.9715,-0.5448 1.0082,-0.4103 1.2686,-0.3717 1.2686,0.1881 0,0.2954 -0.0746,0.3564 -0.8422,0.6882 -1.0262,0.4436 -1.0739,0.4478 -1.2914,0.1126z"
android:strokeWidth="0.5"
android:strokeColor="#fffffd" />
</vector>

View File

@ -0,0 +1,36 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="45sp"
android:height="45sp"
android:viewportWidth="30"
android:viewportHeight="30">
<path
android:fillColor="#7a7a7a"
android:pathData="M3.8712,3.8769L24.7963,3.8769A0.9472,0.9472 0,0 1,25.7435 4.8241L25.7435,24.8343A0.9472,0.9472 0,0 1,24.7963 25.7815L3.8712,25.7815A0.9472,0.9472 0,0 1,2.924 24.8343L2.924,4.8241A0.9472,0.9472 0,0 1,3.8712 3.8769z"
android:strokeWidth="3.57115173"
android:strokeColor="#00000000" />
<path
android:fillAlpha="0.9411765"
android:fillColor="#9f9f9f"
android:pathData="M3.879,3.0349L24.8041,3.0349A0.9472,0.9472 0,0 1,25.7514 3.9822L25.7514,23.9924A0.9472,0.9472 0,0 1,24.8041 24.9396L3.879,24.9396A0.9472,0.9472 0,0 1,2.9318 23.9924L2.9318,3.9822A0.9472,0.9472 0,0 1,3.879 3.0349z"
android:strokeWidth="3.57115173"
android:strokeColor="#00000000" />
<path
android:fillColor="#8a8a8a"
android:pathData="M3.8711,3.4131L24.7962,3.4131A0.9472,0.9472 0,0 1,25.7435 4.3603L25.7435,24.3705A0.9472,0.9472 0,0 1,24.7962 25.3177L3.8711,25.3177A0.9472,0.9472 0,0 1,2.9239 24.3705L2.9239,4.3603A0.9472,0.9472 0,0 1,3.8711 3.4131z"
android:strokeWidth="3.57115173"
android:strokeColor="#00000000" />
<path
android:fillAlpha="0.9411765"
android:fillColor="#8a8a8a"
android:pathData="m12.4827,10.8654h3.907v6.978h-3.907z" />
<path
android:fillColor="#ffffff"
android:pathData="m21.2919,23.2015c0.6342,-0.1548 1.0149,-0.392 1.4344,-0.894 0.7094,-0.8486 0.8512,-2.1283 0.3502,-3.158 -0.1582,-0.3251 -0.377,-0.6401 -0.4861,-0.6999 -0.1847,-0.1012 -0.1868,-0.1424 -0.0305,-0.5933 0.4121,-1.1887 0.2451,-3.014 -0.384,-4.1977 -0.3848,-0.724 -1.2208,-1.4895 -1.8766,-1.7183 -1.3054,-0.4555 -3.136,0.051 -4.0509,1.1204 -1.418,1.6577 -1.7887,3.8542 -0.9565,5.6672 0.2793,0.6085 1.4226,1.7934 2.2541,2.3362 0.402,0.2624 0.6604,0.5313 0.7933,0.8255 0.4347,0.9623 1.8352,1.5845 2.9527,1.3118zM19.7347,22.8078c-0.4177,-0.1787 -0.9625,-0.6424 -1.1335,-0.9646 -0.0846,-0.1596 -0.0299,-0.161 0.5561,-0.0144 1.1521,0.2882 1.9675,0.0109 2.6995,-0.9215 0.3051,-0.3883 0.346,-0.5332 0.3978,-1.4115l0.0577,-0.9789 0.3002,0.3663c0.9623,1.1744 0.5377,3.1707 -0.821,3.8594 -0.5724,0.2901 -1.4649,0.3184 -2.0568,0.0651zM18.7182,21.4086c-1.1454,-0.4457 -2.8916,-2.0023 -3.2716,-2.9163 -0.9165,-2.2045 0.1396,-5.1562 2.19,-6.1208 0.9436,-0.4439 2.0937,-0.462 2.8908,-0.0454 1.6982,0.8873 2.465,3.4189 1.7138,5.6589 -0.1131,0.3371 -0.2067,0.9238 -0.208,1.3038 -0.0056,1.476 -0.786,2.3326 -2.1276,2.3341 -0.3572,0.0004 -0.8771,-0.0933 -1.1874,-0.2141zM18.7696,18.7483c0.0941,-0.1471 0.1413,-0.347 0.1049,-0.4442 -0.0365,-0.0973 -0.4674,-0.3424 -0.9577,-0.5448 -0.994,-0.4103 -1.2506,-0.3717 -1.2506,0.1881 0,0.2954 0.0735,0.3564 0.8303,0.6882 1.0117,0.4436 1.0587,0.4478 1.2731,0.1126z"
android:strokeWidth="0.499999"
android:strokeColor="#ffffff" />
<path
android:fillColor="#ffffff"
android:pathData="m7.8637,17.6849c-0.6433,-0.1548 -1.0294,-0.392 -1.455,-0.894 -0.7195,-0.8486 -0.8635,-2.1283 -0.3552,-3.158 0.1605,-0.3251 0.3824,-0.6401 0.4931,-0.6999 0.1874,-0.1012 0.1895,-0.1424 0.031,-0.5932 -0.418,-1.1887 -0.2486,-3.014 0.3895,-4.1977 0.3903,-0.724 1.2383,-1.4895 1.9035,-1.7183 1.3241,-0.4555 3.181,0.0509 4.1091,1.1204 1.4383,1.6578 1.8143,3.8542 0.9702,5.6672 -0.2833,0.6085 -1.443,1.7934 -2.2864,2.3362 -0.4078,0.2624 -0.6699,0.5313 -0.8047,0.8255 -0.4409,0.9623 -1.8616,1.5845 -2.995,1.3118zM9.4431,17.2912c0.4237,-0.1787 0.9763,-0.6423 1.1497,-0.9646 0.0858,-0.1596 0.0303,-0.161 -0.5641,-0.0144 -1.1687,0.2882 -1.9957,0.0108 -2.7382,-0.9215 -0.3095,-0.3882 -0.3509,-0.5332 -0.4035,-1.4115l-0.0586,-0.9789 -0.3045,0.3663c-0.9761,1.1744 -0.5454,3.1707 0.8327,3.8594 0.5806,0.2901 1.4859,0.3184 2.0864,0.0652zM10.4743,15.892c1.1618,-0.4457 2.9331,-2.0023 3.3186,-2.9163C14.7225,10.7711 13.6513,7.8195 11.5715,6.8549 10.6144,6.411 9.4477,6.3929 8.6392,6.8094c-1.7226,0.8873 -2.5003,3.419 -1.7384,5.6589 0.1147,0.3371 0.2096,0.9238 0.211,1.3038 0.0052,1.4759 0.7973,2.3326 2.1581,2.3341 0.3623,0.0004 0.8897,-0.0933 1.2044,-0.2141zM10.4222,13.2317c-0.0955,-0.1471 -0.1434,-0.347 -0.1064,-0.4442 0.037,-0.0973 0.4741,-0.3424 0.9715,-0.5448 1.0082,-0.4103 1.2686,-0.3717 1.2686,0.1881 0,0.2954 -0.0746,0.3564 -0.8422,0.6882 -1.0262,0.4436 -1.0739,0.4478 -1.2914,0.1126z"
android:strokeWidth="0.5"
android:strokeColor="#fffffd" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#7E7E7E"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M15.5,15.38V8.62L18.88,12L15.5,15.38M20.29,12.71c0.39,-0.39 0.39,-1.02 0,-1.41l-4.59,-4.59C15.08,6.08 14,6.52 14,7.41v9.17c0,0.89 1.08,1.34 1.71,0.71L20.29,12.71zM10,16.59V7.41c0,-0.89 -1.08,-1.34 -1.71,-0.71l-4.59,4.59c-0.39,0.39 -0.39,1.02 0,1.41l4.59,4.59C8.92,17.92 10,17.48 10,16.59z" />
</vector>

View File

@ -1957,10 +1957,85 @@
<item>5</item>
</string-array>
<string-array name="galaxy_touch_options">
<string-array name="galaxy_pro_noise_controls_options_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="galaxy_pro_noise_controls_options">
<item>@string/off</item>
<item>@string/prefs_active_noise_cancelling</item>
<item>@string/prefs_ambient_sound</item>
</string-array>
<string-array name="galaxy_pro_anc_level_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="galaxy_pro_anc_level_options">
<item>@string/prefs_active_noise_cancelling_level_low</item>
<item>@string/prefs_active_noise_cancelling_level_high</item>
</string-array>
<string-array name="galaxy_pro_touch_options_left">
<item>@string/pref_switch_noise_control</item>
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_media_volumedown</item>
<item>@string/pref_title_touch_spotify</item>
</string-array>
<string-array name="galaxy_pro_touch_options_right">
<item>@string/pref_switch_noise_control</item>
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_media_volumeup</item>
<item>@string/pref_title_touch_spotify</item>
</string-array>
<string-array name="galaxy_pro_touch_options_values">
<item>2</item>
<item>1</item>
<item>3</item>
<item>4</item>
</string-array>
<string-array name="galaxy_pro_touch_switch_controls_options">
<item>@string/pref_switch_controls_anc_ambient</item>
<item>@string/pref_switch_controls_anc_off</item>
<item>@string/pref_switch_controls_ambient_off</item>
</string-array>
<string-array name="galaxy_pro_touch_switch_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="galaxy_pro_voice_detect_duration_options">
<item>@string/pref_voice_detect_duration_5</item>
<item>@string/pref_voice_detect_duration_10</item>
<item>@string/pref_voice_detect_duration_15</item>
</string-array>
<string-array name="galaxy_pro_voice_detect_duration_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="galaxy_touch_options_left">
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_title_touch_quick_ambient</item>
<item>@string/pref_title_touch_volume</item>
<item>@string/pref_media_volumedown</item>
<item>@string/pref_title_touch_ambient</item>
</string-array>
<string-array name="galaxy_touch_options_right">
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_title_touch_quick_ambient</item>
<item>@string/pref_media_volumeup</item>
<item>@string/pref_title_touch_ambient</item>
</string-array>
@ -1971,10 +2046,16 @@
<item>3</item>
</string-array>
<string-array name="galaxy_buds_live_touch_options">
<string-array name="galaxy_buds_live_touch_options_left">
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_title_touch_anc</item>
<item>@string/pref_title_touch_volume</item>
<item>@string/pref_media_volumedown</item>
</string-array>
<string-array name="galaxy_buds_live_touch_options_right">
<item>@string/pref_title_touch_voice_assistant</item>
<item>@string/pref_title_touch_anc</item>
<item>@string/pref_media_volumeup</item>
</string-array>
<string-array name="galaxy_buds_live_touch_options_values">

View File

@ -1411,8 +1411,10 @@
<string name="devicetype_nothingear1">Nothing Ear (1)</string>
<string name="devicetype_galaxybuds">Galaxy Buds</string>
<string name="devicetype_galaxybuds_live">Galaxy Buds Live</string>
<string name="devicetype_galaxybuds_pro">Galaxy Buds Pro</string>
<string name="nothing_prefs_inear_summary">Play/pause the music depending if you wear the earbuds</string>
<string name="nothing_prefs_inear_title">In-Ear detection</string>
<string name="prefs_in_ear_detection_summary">Play calls through your earbuds when they are in your ears</string>
<string name="nothing_prefs_audiomode_title">Audio mode</string>
<string name="prefs_equalizer_preset">Equalizer Preset</string>
<string name="pref_title_equalizer_normal">Normal</string>
@ -1430,22 +1432,60 @@
<string name="prefs_touch_lock">Touch Lock</string>
<string name="prefs_touch_lock_summary">Disable touch events</string>
<string name="prefs_galaxy_buds_experimental">Experimental</string>
<string name="prefs_seamless_connection_switch_title">Seamless connection switch</string>
<string name="prefs_seamless_connection_switch_summary">Switches the buds between paired devices automatically</string>
<string name="prefs_ambient_volume">Ambient volume</string>
<string name="prefs_ambient_volume_left">Ambient Volume Left</string>
<string name="prefs_ambient_volume_right">Ambient Volume Right</string>
<string name="prefs_ambient_voice_focus">Voice Focus</string>
<string name="prefs_ambient_voice_summary">Make voice stand out</string>
<string name="prefs_ambient_sound">Ambient Sound</string>
<string name="prefs_customize_ambient_sound_summary">Customize Ambient Sound</string>
<string name="prefs_ambient_sound_during_call_title">Ambient Sound during call</string>
<string name="prefs_ambient_sound_during_call_summary">Hear own voice during call</string>
<string name="prefs_ambient_mode">Ambient Mode</string>
<string name="prefs_ambient_settings_title">Ambient Sound Options</string>
<string name="prefs_active_noise_cancelling">Active Noise Cancelling</string>
<string name="prefs_active_noise_cancelling_level">Active Noise Cancelling Level</string>
<string name="prefs_active_noise_cancelling_level_high">High</string>
<string name="prefs_active_noise_cancelling_level_low">Low</string>
<string name="prefs_active_noise_cancelling_summary">Block noises of the surroundings</string>
<string name="prefs_pressure_relief">Pressure relief with ambient sound</string>
<string name="pressure_relief_summary">Prevent feeling of pressure in ears when not using Active Noise Cancelling</string>
<string name="prefs_left">Left</string>
<string name="prefs_right">Right</string>
<string name="prefs_switch_control_left">Switch control left</string>
<string name="prefs_switch_control_right">Switch control right</string>
<string name="prefs_galaxy_touch_options">Touch Options</string>
<string name="battery_case">Battery case</string>
<string name="left_earbud">Left earbud</string>
<string name="right_earbud">Right earbud</string>
<string name="audio_codec">Audio Codec</string>
<string name="pref_title_touch_voice_assistant">Voice Assistant</string>
<string name="pref_title_touch_anc">Active Noise Cancelling</string>
<string name="pref_title_touch_quick_ambient">Quick Ambient Sound</string>
<string name="pref_title_touch_volume">Volume</string>
<string name="pref_title_touch_ambient">Ambient Sound</string>
<string name="pref_title_touch_spotify">Spotify</string>
<string name="pref_switch_noise_control">Switch Noise Control</string>
<string name="prefs_noise_control_with_one_earbud">Noise Control with one earbud</string>
<string name="prefs_noise_control_with_one_earbud_summary">Allow noise control when using one earbud only</string>
<string name="pref_ambient_sound_tone">Ambient Sound Tone</string>
<string name="pref_ambient_sound_tone_summary">From Soft to Clear</string>
<string name="pref_balance">Balance</string>
<string name="pref_switch_controls_anc_ambient">Noise cancelling ←→ Ambient</string>
<string name="pref_switch_controls_anc_off">Noise cancelling ←→ Off</string>
<string name="pref_switch_controls_ambient_off">Ambient ←→ Off</string>
<string name="prefs_noise_control">Noise control</string>
<string name="prefs_voice_detect">Voice detect</string>
<string name="prefs_voice_detect_summary">Enable Ambient sound and lower playback automatically after voice has been detected</string>
<string name="prefs_double_tap_edge">Double tap edge</string>
<string name="prefs_double_tap_edge_summary">Detect double tap even when not taped on touch pad</string>
<string name="prefs_voice_detect_duration">End after quiet for:</string>
<string name="pref_voice_detect_duration_5">5 seconds</string>
<string name="pref_voice_detect_duration_10">10 seconds</string>
<string name="pref_voice_detect_duration_15">15 seconds</string>
<string name="pref_header_sony_ambient_sound_control">Ambient Sound Control</string>
<string name="pref_header_sony_device_info">Device Information</string>
<string name="sony_ambient_sound">Mode</string>

View File

@ -113,11 +113,6 @@
<item name="pref_device_action_fitness_app_control_start_value" translatable="false" type="string">FITNESS_CONTROL_START</item>
<item name="pref_device_action_fitness_app_control_stop_value" translatable="false" type="string">FITNESS_CONTROL_STOP</item>
<item name="pref_device_action_fitness_app_control_toggle_value" translatable="false" type="string">FITNESS_CONTROL_TOGGLE</item>
<item name="pref_title_touch_voice_assistant" type="string">Voice Assistant</item>
<item name="pref_title_touch_anc" type="string">Active Noise Cancelling</item>
<item name="pref_title_touch_quick_ambient" type="string">Quick Ambient Sound</item>
<item name="pref_title_touch_volume" type="string">Volume</item>
<item name="pref_title_touch_ambient" type="string">Ambient Sound</item>
<item name="pref_theme_value_system" translatable="false" type="string">system</item>
<item name="pref_theme_value_light" translatable="false" type="string">light</item>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceScreen
android:icon="@drawable/ic_hearing"
android:key="prefs_ambient_mode"
@ -22,11 +23,13 @@
android:title="@string/prefs_ambient_voice_focus" />
<SeekBarPreference
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:icon="@drawable/ic_volume_up"
android:key="pref_galaxy_buds_ambient_volume"
android:max="4"
android:min="1"
android:title="@string/prefs_ambient_volume" />
android:max="5"
android:title="@string/prefs_ambient_volume"
app:min="1"
app:showSeekBarValue="true" />
</PreferenceCategory>
</PreferenceScreen>
@ -75,7 +78,7 @@
android:title="@string/prefs_touch_lock" />
<ListPreference
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_touch_options"
android:entries="@array/galaxy_touch_options_left"
android:entryValues="@array/galaxy_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_left"
@ -83,7 +86,7 @@
android:title="@string/prefs_left" />
<ListPreference
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_touch_options"
android:entries="@array/galaxy_touch_options_right"
android:entryValues="@array/galaxy_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_right"

View File

@ -32,7 +32,7 @@
android:title="@string/prefs_touch_lock" />
<ListPreference
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_buds_live_touch_options"
android:entries="@array/galaxy_buds_live_touch_options_left"
android:entryValues="@array/galaxy_buds_live_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_left"
@ -40,7 +40,7 @@
android:title="@string/prefs_left" />
<ListPreference
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_buds_live_touch_options"
android:entries="@array/galaxy_buds_live_touch_options_right"
android:entryValues="@array/galaxy_buds_live_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_right"

View File

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceScreen
android:icon="@drawable/ic_surround"
android:key="pref_galaxy_buds_pro_noise_control_preference"
android:persistent="false"
android:title="@string/prefs_noise_control">
<PreferenceCategory android:title="@string/prefs_noise_control">
<ListPreference
android:defaultValue="0"
android:entries="@array/galaxy_pro_noise_controls_options"
android:entryValues="@array/galaxy_pro_noise_controls_options_values"
android:icon="@drawable/ic_surround"
android:key="pref_galaxy_buds_pro_noise_control"
android:summary="%s"
android:title="@string/prefs_noise_control" />
<ListPreference
android:defaultValue="0"
android:dependency="pref_galaxy_buds_pro_noise_control"
android:entries="@array/galaxy_pro_anc_level_options"
android:entryValues="@array/galaxy_pro_anc_level_values"
android:icon="@drawable/ic_surround"
android:key="pref_galaxy_buds_pro_anc_level"
android:summary="%s"
android:title="@string/prefs_active_noise_cancelling_level" />
<SeekBarPreference
android:icon="@drawable/ic_volume_up"
android:key="pref_galaxy_buds_ambient_volume"
android:max="3"
android:min="0"
android:title="@string/prefs_ambient_volume"
app:showSeekBarValue="false" />
</PreferenceCategory>
</PreferenceScreen>
<ListPreference
android:defaultValue="0"
android:entries="@array/galaxy_buds_live_equalizer_modes"
android:entryValues="@array/galaxy_buds_live_equalizer_values"
android:icon="@drawable/ic_equalizer"
android:key="pref_galaxy_buds_equalizer_mode"
android:summary="%s"
android:title="@string/prefs_equalizer_preset" />
<PreferenceScreen
android:icon="@drawable/ic_touch"
android:key="prefs_galaxy_touch_options"
android:persistent="false"
android:title="@string/prefs_galaxy_touch_options">
<PreferenceCategory android:title="@string/prefs_galaxy_touch_options">
<SwitchPreference
android:defaultValue="false"
android:disableDependentsState="true"
android:icon="@drawable/ic_lock_open"
android:key="pref_galaxy_buds_lock_touch"
android:summary="@string/prefs_touch_lock_summary"
android:title="@string/prefs_touch_lock" />
<ListPreference
android:defaultValue="0"
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_pro_touch_options_left"
android:entryValues="@array/galaxy_pro_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_left"
android:summary="%s"
android:title="@string/prefs_left" />
<ListPreference
android:defaultValue="0"
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_pro_touch_switch_controls_options"
android:entryValues="@array/galaxy_pro_touch_switch_controls_values"
android:icon="@drawable/ic_switch_left"
android:key="pref_galaxy_buds_touch_left_switch"
android:summary="%s"
android:title="@string/prefs_switch_control_left" />
<ListPreference
android:defaultValue="0"
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_pro_touch_options_right"
android:entryValues="@array/galaxy_pro_touch_options_values"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_buds_touch_right"
android:summary="%s"
android:title="@string/prefs_right" />
<ListPreference
android:defaultValue="0"
android:dependency="pref_galaxy_buds_lock_touch"
android:entries="@array/galaxy_pro_touch_switch_controls_options"
android:entryValues="@array/galaxy_pro_touch_switch_controls_values"
android:icon="@drawable/ic_switch_right"
android:key="pref_galaxy_buds_touch_right_switch"
android:summary="%s"
android:title="@string/prefs_switch_control_right" />
<SwitchPreference
android:defaultValue="false"
android:dependency="pref_galaxy_buds_lock_touch"
android:icon="@drawable/ic_touch"
android:key="pref_galaxy_pro_double_tap_edge"
android:summary="@string/prefs_double_tap_edge_summary"
android:title="@string/prefs_double_tap_edge" />
</PreferenceCategory>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_settings"
android:key="prefs_settings"
android:persistent="false"
android:title="@string/title_activity_settings">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_hearing"
android:key="pref_galaxy_buds_pro_in_ear_detection"
android:summary="@string/prefs_in_ear_detection_summary"
android:title="@string/nothing_prefs_inear_title" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_auto_awesome"
android:key="pref_galaxy_buds_pro_seamless_connection"
android:summary="@string/prefs_seamless_connection_switch_summary"
android:title="@string/prefs_seamless_connection_switch_title" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_hearing"
android:key="pref_galaxy_buds_noise_controls_with_one_earbud"
android:summary="@string/prefs_noise_control_with_one_earbud_summary"
android:title="@string/prefs_noise_control_with_one_earbud" />
<SeekBarPreference
android:defaultValue="50"
android:icon="@drawable/ic_volume_up"
android:key="pref_galaxy_buds_pro_balance"
android:max="32"
android:min="0"
android:title="@string/pref_balance"
app:defaultValue="16"
app:showSeekBarValue="true" />
<PreferenceCategory android:title="@string/prefs_galaxy_buds_experimental">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_videogame"
android:key="pref_galaxy_buds_game_mode"
android:summary="@string/prefs_game_mode_summary"
android:title="@string/prefs_game_mode" />
</PreferenceCategory>
<!-- <SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_graphic_eq"
android:key="pref_galaxy_buds_pro_read_notifications_outloud"
android:title="@string/prefs_read_notification_outloud" />
-->
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_settings_applications"
android:key="prefs_accessibility"
android:persistent="false"
android:title="@string/prefs_ambient_settings_title">
<PreferenceCategory android:title="@string/prefs_voice_detect">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_voice"
android:key="pref_galaxy_buds_pro_voice_detect"
android:summary="@string/prefs_voice_detect_summary"
android:title="@string/prefs_voice_detect" />
<ListPreference
android:defaultValue="5"
android:dependency="pref_galaxy_buds_pro_voice_detect"
android:entries="@array/galaxy_pro_voice_detect_duration_options"
android:entryValues="@array/galaxy_pro_voice_detect_duration_values"
android:icon="@drawable/ic_timer"
android:key="pref_galaxy_buds_pro_voice_detect_duration"
android:summary="%s"
android:title="@string/prefs_voice_detect_duration" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_ambient_sound">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_hearing"
android:key="pref_galaxy_buds_ambient_mode_during_call"
android:summary="@string/prefs_ambient_sound_during_call_summary"
android:title="@string/prefs_ambient_sound_during_call_title" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_hearing"
android:key="pref_galaxy_buds_ambient_sound"
android:summary="@string/prefs_customize_ambient_sound_summary"
android:title="@string/prefs_ambient_sound" />
<SeekBarPreference
android:defaultValue="1"
android:dependency="pref_galaxy_buds_ambient_sound"
android:icon="@drawable/ic_volume_up"
android:key="pref_galaxy_buds_pro_ambient_volume_right"
android:max="4"
android:min="0"
android:title="@string/prefs_ambient_volume_right"
app:showSeekBarValue="false" />
<SeekBarPreference
android:defaultValue="1"
android:dependency="pref_galaxy_buds_ambient_sound"
android:icon="@drawable/ic_volume_up"
android:key="pref_galaxy_buds_pro_ambient_volume_left"
android:max="4"
android:min="0"
android:title="@string/prefs_ambient_volume_left"
app:showSeekBarValue="false" />
<SeekBarPreference
android:defaultValue="1"
android:dependency="pref_galaxy_buds_ambient_sound"
android:icon="@drawable/ic_surround"
android:key="pref_galaxy_buds_pro_ambient_sound_tone"
android:max="4"
android:min="0"
android:summary="@string/pref_ambient_sound_tone_summary"
android:title="@string/pref_ambient_sound_tone"
app:showSeekBarValue="false" />
</PreferenceCategory>
</PreferenceScreen>
</androidx.preference.PreferenceScreen>