FileDocCategorySizeDatePackage
DcTesterFailBringUpAll.javaAPI DocAndroid 5.1 API4095Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.dataconnection

DcTesterFailBringUpAll

public class DcTesterFailBringUpAll extends Object
A package level call that causes all DataConnection bringUp calls to fail a specific number of times. Here is an example that sets counter to 2 and cause to -3 for all instances: adb shell am broadcast -a com.android.internal.telephony.dataconnection.action_fail_bringup \ --ei counter 2 --ei fail_cause -3 Also you can add a suggested retry time if desired: --ei suggested_retry_time 5000 The fail_cause is one of {@link DcFailCause}

Fields Summary
private static final String
LOG_TAG
private static final boolean
DBG
private com.android.internal.telephony.PhoneBase
mPhone
private String
mActionFailBringUp
private DcFailBringUp
mFailBringUp
private android.content.BroadcastReceiver
mIntentReceiver
Constructors Summary
DcTesterFailBringUpAll(com.android.internal.telephony.PhoneBase phone, android.os.Handler handler)


        
        mPhone = phone;
        if (Build.IS_DEBUGGABLE) {
            IntentFilter filter = new IntentFilter();

            filter.addAction(mActionFailBringUp);
            log("register for intent action=" + mActionFailBringUp);

            filter.addAction(mPhone.getActionDetached());
            log("register for intent action=" + mPhone.getActionDetached());

            filter.addAction(mPhone.getActionAttached());
            log("register for intent action=" + mPhone.getActionAttached());

            phone.getContext().registerReceiver(mIntentReceiver, filter, null, handler);
        }
    
Methods Summary
voiddispose()

        if (Build.IS_DEBUGGABLE) {
            mPhone.getContext().unregisterReceiver(mIntentReceiver);
        }
    
DcFailBringUpgetDcFailBringUp()

        return mFailBringUp;
    
private voidlog(java.lang.String s)

        Rlog.d(LOG_TAG, s);