diff options
| author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-10-12 18:23:08 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-10-12 18:23:08 +0000 |
| commit | 562d37d1977f87a632c8b30828f331becc49520f (patch) | |
| tree | 89154549609cba57b9e29b79a698502e4d754f46 /core/java | |
| parent | 0cf7f96f8253e7a9649e4ae60795883853fe0e50 (diff) | |
| parent | d1773d6459300876d5361672a273784d5450383d (diff) | |
Merge "Merge "Add DumpstateOptions java implementation" am: 52502ef1a1 am: 8a9f23c8a1 am: 1d1184cf83"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/DumpstateOptions.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/core/java/android/os/DumpstateOptions.java b/core/java/android/os/DumpstateOptions.java new file mode 100644 index 000000000000..53037b2499cd --- /dev/null +++ b/core/java/android/os/DumpstateOptions.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.os; + +/** + * Options passed to dumpstate service. + * + * @hide + */ +public final class DumpstateOptions implements Parcelable { + // If true the caller can get callbacks with per-section + // progress details. + private final boolean mGetSectionDetails; + // Name of the caller. + private final String mName; + + public DumpstateOptions(Parcel in) { + mGetSectionDetails = in.readBoolean(); + mName = in.readString(); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeBoolean(mGetSectionDetails); + out.writeString(mName); + } + + public static final Parcelable.Creator<DumpstateOptions> CREATOR = + new Parcelable.Creator<DumpstateOptions>() { + public DumpstateOptions createFromParcel(Parcel in) { + return new DumpstateOptions(in); + } + + public DumpstateOptions[] newArray(int size) { + return new DumpstateOptions[size]; + } + }; +} |
