Giter Site home page Giter Site logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I've yet another patch for state management :)  With the following patch, the 
service is more "reactive" to external state changes - ie, we don't trust what 
we *think* the state is, we use what the connection state actually is.  The 
actual connection state may change behind our back - eg, as a network error is 
handled, or as a scheduled retry finally connects.

This patch also makes things more thread-safe - the worker thread is now 
responsible for handling incoming chat messages - previously onMessageReceived 
was called on the main thread leading to the possibility of the worker thread 
handling state changes *while* a message was being sent.

It is fairly large, but my testing shows it works perfectly ;)  A limitation 
though is that changes to connection preferences will likely not be picked up 
after a connection is established - we probably just need a property-change 
listener, but I thought I'd leave that out of this...

FWIW, this bug also fixes the new bug re the "GTalkSMS stopped" toast message 
not being removed (as this message is now only ever generated by the main 
thread, not the worker thread...

Original comment by [email protected] on 5 Jan 2011 at 7:59

Attachments:

from gtalksms.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Bugger - just saw the app crash with that patch when a call was received - I'll 
check it out...

Original comment by [email protected] on 5 Jan 2011 at 9:54

from gtalksms.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
That's not your patch, on market someone has the same error on the 1.6:

java.lang.IllegalArgumentException: URI: 
content://com.android.contacts/phone_lookup/, calling user: 
com.googlecode.gtalksms, calling package:com.googlecode.gtalksms
at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:144)
at 
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
at 
android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.jav
a:330)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
at android.content.ContentResolver.query(ContentResolver.java:250)
at 
com.googlecode.gtalksms.data.contacts.ContactsManager.getContactName(ContactsMan
ager.java:32)
at 
com.googlecode.gtalksms.receivers.PhoneCallListener.onCallStateChanged(PhoneCall
Listener.java:30)
at 
android.telephony.PhoneStateListener$2.handleMessage(PhoneStateListener.java:319
)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:60)

Original comment by [email protected] on 5 Jan 2011 at 9:57

from gtalksms.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024

Original comment by [email protected] on 5 Jan 2011 at 9:19

  • Changed state: Started

from gtalksms.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024

Original comment by [email protected] on 5 Jan 2011 at 9:36

  • Changed state: Fixed

from gtalksms.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024

Original comment by [email protected] on 25 Aug 2011 at 7:51

  • Changed state: Deployed

from gtalksms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.