Good lord do not use Thread.sleep(5000).

Basic thing everyone should think: "I see a Thread.sleep(), the code is
WRONG."

The SIM operator information just is not guaranteed to be available when the
device first comes up, it depends on how long the telephony system takes to
initialize.  You MUST watch for changes to the state you are interested in,
either configuration changes if you want the current MNC/MCC in the
configuration, or other telephony APIs if you want other things.

On Wed, Jun 8, 2011 at 11:37 PM, Abhishek Kumar Gupta
<[email protected]>wrote:

> How to know the SIM Operator information before the loadfavorities() method
> in LauncherProvider.java execute( /home/abhishek/gingerbread/
> packages/apps/Launcher2/src/com/android/launcher2/LauncherProvider ) , so
> that I can use SIM Operator information.
> Currently, I am using *Thread.sleep(5000)*  to get the SIM operator
> information in LauncherProvider.java, is there any alternative?
> Please help me.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to