Code example for PrintWriter

Methods: println

0
 
    @Override 
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
 
        pw.println("SamplingProfilerService:");
        pw.println("Watching directory: " + SNAPSHOT_DIR);
    } 
 
    private class SamplingProfilerSettingsObserver extends ContentObserver {
        private ContentResolver mContentResolver;
        public SamplingProfilerSettingsObserver(ContentResolver contentResolver) {
            super(null); 
            mContentResolver = contentResolver;
            onChange(false); 
        } 
        @Override 
        public void onChange(boolean selfChange) {
            Integer samplingProfilerMs = Settings.Global.getInt(
                    mContentResolver, Settings.Global.SAMPLING_PROFILER_MS, 0);
            // setting this secure property will start or stop sampling profiler,