bettybop68 / android-rcs-ims-stack

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

provider/eab/ContactsManager.java KEY_PRESENCE_SHARING_STATUS being treated sometimes as Int #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Two clients in a social presence sharing relationship Alice and Bob.
2.Alice receives a presence notification for Bob
3.Alice looks up Bob's contact information.

What is the expected output? What do you see instead?

Expected: The social presence information should become visible.  
Instead: The social presence information is not visible. 

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

Product: Release 2.5.0. API RCSE_BLACKBIRD_BASE_OrangeLabs_2.8
OS: Android 2.3.3 and Android 2.3.4

Please provide any additional information below.

Alice's client does a ContactsManager.getContactSharingStatus call which 
attempts to convert the string value of the overriding willingness stored in 
the eab.db presence_sharing_status to an integer. 

This happens in the cursor.getInt(0) call.  Which according to the
http://developer.android.com/reference/android/database/Cursor.html#getInt%28int
%29 is implementation-defined.

"The result and whether this method throws an exception when the column value 
is null, the column type is not an integral type, or the integer value is 
outside the range [Integer.MIN_VALUE, Integer.MAX_VALUE] is 
implementation-defined"

LogCat shows it as returning 0 in the emulator for both "open" and "closed".  
Other method in the ContactManager also appear to assume this text column 
contains and integer value.  The isNumberXXXX methods(Blocked, Shared etc..)

Original issue reported on code.google.com by mikesmac...@gmail.com on 30 Jan 2013 at 6:30