微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android.util.PrintWriterPrinter的实例源码

项目:keepass2android    文件KP2AKeyboard.java   
@Override
protected void dump(FileDescriptor fd,PrintWriter fout,String[] args) {
    super.dump(fd,fout,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    p.println("  Keyboard mode = " + mKeyboardSwitcher.getKeyboardMode());
    p.println("  mCapsLock=" + mCapsLock);
    p.println("  mComposing=" + mComposing.toString());
    p.println("  mPredictionOn=" + mPredictionOn);
    p.println("  mCorrectionMode=" + mCorrectionMode);
    p.println("  mPredicting=" + mPredicting);
    p.println("  mAutoCorrectOn=" + mAutoCorrectOn);
    p.println("  mAutoSpace=" + mAutoSpace);
    p.println("  mCompletionOn=" + mCompletionOn);
    p.println("  TextEntryState.state=" + TextEntryState.getState());
    p.println("  mSoundOn=" + mSoundOn);
    p.println("  mVibrateOn=" + mVibrateOn);
    p.println("  mPopupOn=" + mPopupOn);
}
项目:ProgressManager    文件a.java   
void dumpInner(String prefix,FileDescriptor fd,PrintWriter writer,String[] args) {
    writer.print(prefix); writer.print("Local Activity ");
    writer.print(Integer.toHexString(System.identityHashCode(this)));
    writer.println(" State:");
    String innerPrefix = prefix + "  ";
    writer.print(innerPrefix); writer.print("mResumed=");
    writer.print(mResumed); writer.print(" mStopped=");
    writer.print(mStopped); writer.print(" mFinished=");
    writer.println(mFinished);
    writer.print(innerPrefix); writer.print("mChangingConfigurations=");
    writer.println(mChangingConfigurations);
    writer.print(innerPrefix); writer.print("mCurrentConfig=");
    writer.println(mCurrentConfig);

    mFragments.dumpLoaders(innerPrefix,fd,writer,args);
    mFragments.getFragmentManager().dump(innerPrefix,args);
    if (mVoiceInteractor != null) {
        mVoiceInteractor.dump(innerPrefix,args);
    }

    if (getwindow() != null &&
            getwindow().peekDecorView() != null &&
            getwindow().peekDecorView().getViewRootImpl() != null) {
        getwindow().peekDecorView().getViewRootImpl().dump(prefix,args);
    }

    mHandler.getLooper().dump(new PrintWriterPrinter(writer),prefix);
}
项目:AOSP-Kayboard-7.1.2    文件LatiniME.java   
@Override
protected void dump(final FileDescriptor fd,final PrintWriter fout,final String[] args) {
    super.dump(fd,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    p.println("  VersionCode = " + ApplicationUtils.getVersionCode(this));
    p.println("  VersionName = " + ApplicationUtils.getVersionName(this));
    final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
    final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
    p.println("  Keyboard mode = " + keyboardMode);
    final SettingsValues settingsValues = mSettings.getCurrent();
    p.println(settingsValues.dump());
    p.println(mDictionaryFacilitator.dump(this /* context */));
    // Todo: Dump all settings values
}
项目:KeePass2Android    文件KP2AKeyboard.java   
@Override
protected void dump(FileDescriptor fd,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    p.println("  Keyboard mode = " + mKeyboardSwitcher.getKeyboardMode());
    p.println("  mCapsLock=" + mCapsLock);
    p.println("  mComposing=" + mComposing.toString());
    p.println("  mPredictionOn=" + mPredictionOn);
    p.println("  mCorrectionMode=" + mCorrectionMode);
    p.println("  mPredicting=" + mPredicting);
    p.println("  mAutoCorrectOn=" + mAutoCorrectOn);
    p.println("  mAutoSpace=" + mAutoSpace);
    p.println("  mCompletionOn=" + mCompletionOn);
    p.println("  TextEntryState.state=" + TextEntryState.getState());
    p.println("  mSoundOn=" + mSoundOn);
    p.println("  mVibrateOn=" + mVibrateOn);
    p.println("  mPopupOn=" + mPopupOn);
}
项目:hackerskeyboard    文件LatiniME.java   
@Override
protected void dump(FileDescriptor fd,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    p.println("  Keyboard mode = " + mKeyboardSwitcher.getKeyboardMode());
    p.println("  mComposing=" + mComposing.toString());
    p.println("  mPredictionOnForMode=" + mPredictionOnForMode);
    p.println("  mCorrectionMode=" + mCorrectionMode);
    p.println("  mPredicting=" + mPredicting);
    p.println("  mAutoCorrectOn=" + mAutoCorrectOn);
    p.println("  mAutoSpace=" + mAutoSpace);
    p.println("  mCompletionOn=" + mCompletionOn);
    p.println("  TextEntryState.state=" + TextEntryState.getState());
    p.println("  mSoundOn=" + mSoundOn);
    p.println("  mVibrateOn=" + mVibrateOn);
    p.println("  mPopupOn=" + mPopupOn);
}
项目:android-kioskime    文件LatiniME.java   
@Override
protected void dump(final FileDescriptor fd,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
    final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
    p.println("  Keyboard mode = " + keyboardMode);
    final SettingsValues settingsValues = mSettings.getCurrent();
    p.println("  mIsSuggestionsSuggestionsRequested = "
            + settingsValues.isSuggestionsRequested(mdisplayOrientation));
    p.println("  mCorrectionEnabled=" + settingsValues.mCorrectionEnabled);
    p.println("  isComposingWord=" + mWordComposer.isComposingWord());
    p.println("  mSoundOn=" + settingsValues.mSoundOn);
    p.println("  mVibrateOn=" + settingsValues.mVibrateOn);
    p.println("  mKeyPreviewPopupOn=" + settingsValues.mKeyPreviewPopupOn);
    p.println("  inputAttributes=" + settingsValues.mInputAttributes);
}
项目:simple-keyboard    文件LatiniME.java   
@Override
protected void dump(final FileDescriptor fd,args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatiniME state :");
    p.println("  VersionCode = " + ApplicationUtils.getVersionCode(this));
    p.println("  VersionName = " + ApplicationUtils.getVersionName(this));
    final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
    final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
    p.println("  Keyboard mode = " + keyboardMode);
}
项目:LiteSDK    文件AppCrashHandler.java   
private void dump(CrashInfo crashInfo) {
    try {
        File dir = FileUtils.getExternalCacheDir(mContext,String.format(CRASH_LOG_DIR,mContext.getPackageName()));
        File file = new File(dir,String.format(CRASH_LOG_FILE_NAME,System.currentTimeMillis()));
        OutputStream outputStream = new FileOutputStream(file);
        crashInfo.dump(new PrintWriterPrinter(new PrintWriter(outputStream)),"");
    } catch (FileNotFoundException ex) {
        ex.printstacktrace();
    }
}
项目:Asynchronous-Android-Programming    文件CancelMessagesActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final Handler handler = new SpeakHandler();

    String stringRef1 = new String("Welcome!");
    String stringRef2 = new String("Welcome Home!");
    Message msg1 =  Message.obtain(handler,SpeakHandler.SAY_WORD,stringRef1);
    Message msg2 =  Message.obtain(handler,stringRef2);

    // Enqueue the messages to be processed later
    handler.sendMessageDelayed(msg1,600000);
    handler.sendMessageDelayed(msg2,600000);

    // try to remove the messages
    handler.removeMessages(SpeakHandler.SAY_WORD,stringRef1);
    handler.removeMessages(SpeakHandler.SAY_WORD,new String("Welcome Home!"));

    PrintWriterPrinter out= new PrintWriterPrinter(new PrintWriter(System.out,true));

    if ( handler.hasMessages(SpeakHandler.SAY_WORD,stringRef2) ) {
        Log.i("RefComparison","Sorry,we Failed to " +
                "remove the 'Welcome Home' message!!");
    }
    handler.getLooper().dump(out,">>> Looper Queue Dump ");
}
项目:Asynchronous-Android-Programming    文件HandlerExampleActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.handler_example_layout);

    TextView console = (TextView)findViewById(R.id.title);
    console.setText("Chapter 2 - Multithread Handler");

    final WeatherPresenter presHandler = new WeatherPresenter();
    HandlerThread handlerThread = new HandlerThread("background",Process.THREAD_PRIORITY_URGENT_disPLAY);
    handlerThread.start();

    final WeatherRetriever retHandler = new WeatherRetriever(
            handlerThread.getLooper(),presHandler);

    Button todayBut = (Button)findViewById(R.id.todayBut);
    todayBut.setonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            retHandler.sendEmptyMessage(WeatherRetriever.GET_TODAY_FORECAST);
        }
    });

    retHandler.removeCallbacksAndMessages(null);
    retHandler.hasMessages(WeatherRetriever.GET_TODAY_FORECAST);


  //  retHandler.sendEmptyMessage(WeatherRetriever.GET_TODAY_FORECAST);

    PrintWriterPrinter out= new PrintWriterPrinter(new PrintWriter(System.out,true));
    handlerThread.getLooper().setMessageLogging(out);
}
项目:droidel    文件ActivityThread.java   
@Override
public void dumpDbInfo(FileDescriptor fd,String[] args) {
    PrintWriter pw = new FastPrintWriter(new FileOutputStream(fd));
    PrintWriterPrinter printer = new PrintWriterPrinter(pw);
    sqliteDebug.dump(printer,args);
    pw.flush();
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。