Move to Android N-MR1 SDK.
[android_tools.git] / sdk / sources / android-25 / android / app / FragmentManagerNonConfig.java
blob50d3797dd59dc1bac290b230d3860f928a8af02b
1 /*
2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 package android.app;
20 import java.util.List;
22 /**
23 * FragmentManagerNonConfig stores the retained instance fragments across
24 * activity recreation events.
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>
31 public class FragmentManagerNonConfig {
32 private final List<Fragment> mFragments;
33 private final List<FragmentManagerNonConfig> mChildNonConfigs;
35 FragmentManagerNonConfig(List<Fragment> fragments,
36 List<FragmentManagerNonConfig> childNonConfigs) {
37 mFragments = fragments;
38 mChildNonConfigs = childNonConfigs;
41 /**
42 * @return the retained instance fragments returned by a FragmentManager
44 List<Fragment> getFragments() {
45 return mFragments;
48 /**
49 * @return the FragmentManagerNonConfigs from any applicable fragment's child FragmentManager
51 List<FragmentManagerNonConfig> getChildNonConfigs() {
52 return mChildNonConfigs;