gulelat / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

Bad interpretation of ChatAuth configuration parameter #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a HTTPS config server return (among others): <parm name="ChatAuth" 
value="1"/>
2. Go to provisioning part and see IM session capability (Profile tab)

What is the expected output? What do you see instead?
IM session is disabled. Value 1 should enable chat capability. 0 should disable.

What version of the product are you using? On what operating system?
2.3.6, Android 2.3.6

Please provide any additional information below.
According to Rich Communication Suite Release 2 Management Objects Version 2.0 
(point 4.4):
(...)
Node: /<X>/ChatAuth
Leaf node that represent the authorization for user to use Chat service
(...)
- Values: 0, 1
0- Indicates that Chat service is disabled
1- Indicates that Chat service is enabled
(...)

Original issue reported on code.google.com by pkurp...@gmail.com on 31 Jan 2012 at 8:17

GoogleCodeExporter commented 9 years ago
In ProvisioningParser.java:
Currently:
----------------------------
if (ChatAuthvalue == null) {
                    if ((ChatAuthvalue = getValueByParmName("ChatAuth", childnode)) != null) {
                        if (logger.isActivated()) {
                            logger.debug("ChatAuth = " + ChatAuthvalue);
                        }
                        if (ChatAuthvalue.equals("0")) {
                            RcsSettings.getInstance().writeParameter(
                                    RcsSettingsData.CAPABILITY_IM_SESSION, RcsSettingsData.TRUE);
                        } else {
                            RcsSettings.getInstance().writeParameter(
                                    RcsSettingsData.CAPABILITY_IM_SESSION, RcsSettingsData.FALSE);
                        }
                        continue;
                    }
                }
----------------------------

Suggested:
----------------------------
if (ChatAuthvalue == null) {
                    if ((ChatAuthvalue = getValueByParmName("ChatAuth", childnode)) != null) {
                        if (logger.isActivated()) {
                            logger.debug("ChatAuth = " + ChatAuthvalue);
                        }
                        if (ChatAuthvalue.equals("1")) {
                            RcsSettings.getInstance().writeParameter(
                                    RcsSettingsData.CAPABILITY_IM_SESSION, RcsSettingsData.TRUE);
                        } else {
                            RcsSettings.getInstance().writeParameter(
                                    RcsSettingsData.CAPABILITY_IM_SESSION, RcsSettingsData.FALSE);
                        }
                        continue;
                    }
                }
----------------------------

Original comment by pkurp...@gmail.com on 31 Jan 2012 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by jmauffret@gmail.com on 3 Feb 2012 at 8:18

GoogleCodeExporter commented 9 years ago
In next release 

Original comment by jmauffret@gmail.com on 6 Feb 2012 at 8:30