• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to dump log to file from GsmServiceStateTracker.java

AllanChao

Lurker
Hi All,
in the GsmServiceStateTracker.java, there is a dump function like following

public void dump(FileDescriptor fd,PrintWriter pw,String[] args){
pw.println("ServiceStateTracker:");
pw.println(" mSS="+ mSS);
pw.println(" mNewSS="+ mNewSS);
pw.println(" mCellInfo="+ mCellInfo);
pw.println(" mRestrictedState="+ mRestrictedState);
pw.println(" mPollingContext="+ mPollingContext);
pw.println(" mDesiredPowerState="+ mDesiredPowerState);
pw.println(" mDontPollSignalStrength="+ mDontPollSignalStrength);
pw.println(" mPendingRadioPowerOffAfterDataOff="+ mPendingRadioPowerOffAfterDataOff);
pw.println(" mPendingRadioPowerOffAfterDataOffTag="+ mPendingRadioPowerOffAfterDataOffTag);
}

and i want to see these value when radio switch on
so, does anyone know how to execute the dump function? thanks.
 
Are there any API javadocs for this class?

The second parameter is the file you want to write to, which can be created like this

Code:
    File file =new File(your file name);
    PrintWriter printWriter =newPrintWriter(file);

It's unclear what the other two parameters are for, but you could dig into the code a bit, and look at the super class of GsmServiceStateTracker, to see what the code is doing with these parameters.
 
Back
Top Bottom