Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Preference.BaseSavedState\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBaseSavedState\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/preference/Preference.BaseSavedState \"View this page in Java\") \n\n```\nopen class BaseSavedState : AbsSavedState\n```\n\n|---|---|---------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.view.AbsSavedState](../view/AbsSavedState.html#) ||\n| | ↳ | [android.preference.Preference.BaseSavedState](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 29.**\n|\n| Use the [AndroidX](https://developer.android.com/jetpack/androidx.html) [Preference Library](https://developer.android.com/reference/androidx/preference/package-summary.html) for consistent behavior across all devices. For more information on using the AndroidX Preference Library see [Settings](https://developer.android.com/guide/topics/ui/settings.html).\n\nA base class for managing the instance state of a [Preference](/reference/kotlin/android/preference/Preference).\n\nSummary\n-------\n\n| Inherited constants ||\n|---|---|\n| From class [Parcelable](../os/Parcelable.html#) |----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](../os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) Descriptor bit used with [describeContents()](../os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](../os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) Flag for use with [writeToParcel](../os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): the object being written is a return value, that is the result of a function such as \"`Parcelable someFunction()`\", \"`void someFunction(out Parcelable)`\", or \"`void someFunction(inout Parcelable)`\". Some implementations may want to release resources at this point. \u003cbr /\u003e | ||\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------|---|\n| [BaseSavedState](#BaseSavedState(android.os.Parcel))`(`source:` `[Parcel](../os/Parcel.html#)!`)` \u003cbr /\u003e |\n| [BaseSavedState](#BaseSavedState(android.os.Parcelable))`(`superState:` `[Parcelable](../os/Parcelable.html#)!`)` \u003cbr /\u003e |\n\n| Inherited functions ||\n|---|---|\n| From class [AbsSavedState](../view/AbsSavedState.html#) |------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [describeContents](../view/AbsSavedState.html#describeContents())`()` \u003cbr /\u003e | | [Parcelable](../os/Parcelable.html#)! | [getSuperState](../view/AbsSavedState.html#getSuperState())`()` \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](../view/AbsSavedState.html#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](../os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e | ||\n\n| Properties ||\n|------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n| static [Parcelable.Creator](../os/Parcelable.Creator.html#)\\\u003c[Preference.BaseSavedState](#)!\\\u003e | [CREATOR](#CREATOR:android.os.Parcelable.Creator) \u003cbr /\u003e |\n\n| Inherited properties ||\n|---|---|\n| From class [AbsSavedState](../view/AbsSavedState.html#) |-----------------------------------------------|-----------------------------------------------------------------------------------------| | [AbsSavedState](../view/AbsSavedState.html#)! | [EMPTY_STATE](../view/AbsSavedState.html#EMPTY_STATE:android.view.AbsSavedState) \u003cbr /\u003e | ||\n\nPublic constructors\n-------------------\n\n### BaseSavedState\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBaseSavedState(source: Parcel!)\n``` \n\n### BaseSavedState\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBaseSavedState(superState: Parcelable!)\n```\n\nProperties\n----------\n\n### CREATOR\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CREATOR: Parcelable.Creator\u003cPreference.BaseSavedState!\u003e\n```\n\n**Deprecated:** *Deprecated in Java.*"]]