1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18package android.app;
19
20import java.util.List;
21
22/**
23 * FragmentManagerNonConfig stores the retained instance fragments across
24 * activity recreation events.
25 *
26 * <p>Apps should treat objects of this type as opaque, returned by
27 * and passed to the state save and restore process for fragments in
28 * {@link FragmentController#retainNonConfig()} and
29 * {@link FragmentController#restoreAllState(Parcelable, FragmentManagerNonConfig)}.</p>
30 *
31 * @deprecated Use the <a href="{@docRoot}tools/extras/support-library.html">Support Library</a>
32 *      {@link android.support.v4.app.FragmentManagerNonConfig}
33 */
34@Deprecated
35public class FragmentManagerNonConfig {
36    private final List<Fragment> mFragments;
37    private final List<FragmentManagerNonConfig> mChildNonConfigs;
38
39    FragmentManagerNonConfig(List<Fragment> fragments,
40            List<FragmentManagerNonConfig> childNonConfigs) {
41        mFragments = fragments;
42        mChildNonConfigs = childNonConfigs;
43    }
44
45    /**
46     * @return the retained instance fragments returned by a FragmentManager
47     */
48    List<Fragment> getFragments() {
49        return mFragments;
50    }
51
52    /**
53     * @return the FragmentManagerNonConfigs from any applicable fragment's child FragmentManager
54     */
55    List<FragmentManagerNonConfig> getChildNonConfigs() {
56        return mChildNonConfigs;
57    }
58}
59