FileDocCategorySizeDatePackage
StkApp.javaAPI DocAndroid 1.5 API2089Wed May 06 22:42:48 BST 2009com.android.stk

StkApp

public abstract class StkApp extends android.app.Application
Top-level Application class for STK app.

Fields Summary
public static final boolean
DBG
static final int
MENU_ID_END_SESSION
static final int
MENU_ID_BACK
static final int
MENU_ID_HELP
static final int
UI_TIMEOUT
static final int
TONE_DFEAULT_TIMEOUT
public static final String
TAG
Constructors Summary
Methods Summary
public static intcalculateDurationInMilis(com.android.internal.telephony.gsm.stk.Duration duration)
This function calculate the time in MS from a duration instance. returns zero when duration is null.


                          
         
        int timeout = 0;
        if (duration != null) {
            switch (duration.timeUnit) {
            case MINUTE:
                timeout = 1000 * 60;
                break;
            case TENTH_SECOND:
                timeout = 1000 * 10;
                break;
            case SECOND:
            default:
                timeout = 1000;
                break;
            }
            timeout *= duration.timeInterval;
        }
        return timeout;