120680c49584c26f7818c2dec8fb00633af753e4aChris Banes/*
220680c49584c26f7818c2dec8fb00633af753e4aChris Banes * Copyright (C) 2015 The Android Open Source Project
320680c49584c26f7818c2dec8fb00633af753e4aChris Banes *
420680c49584c26f7818c2dec8fb00633af753e4aChris Banes * Licensed under the Apache License, Version 2.0 (the "License");
520680c49584c26f7818c2dec8fb00633af753e4aChris Banes * you may not use this file except in compliance with the License.
620680c49584c26f7818c2dec8fb00633af753e4aChris Banes * You may obtain a copy of the License at
720680c49584c26f7818c2dec8fb00633af753e4aChris Banes *
820680c49584c26f7818c2dec8fb00633af753e4aChris Banes *      http://www.apache.org/licenses/LICENSE-2.0
920680c49584c26f7818c2dec8fb00633af753e4aChris Banes *
1020680c49584c26f7818c2dec8fb00633af753e4aChris Banes * Unless required by applicable law or agreed to in writing, software
1120680c49584c26f7818c2dec8fb00633af753e4aChris Banes * distributed under the License is distributed on an "AS IS" BASIS,
1220680c49584c26f7818c2dec8fb00633af753e4aChris Banes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1320680c49584c26f7818c2dec8fb00633af753e4aChris Banes * See the License for the specific language governing permissions and
1420680c49584c26f7818c2dec8fb00633af753e4aChris Banes * limitations under the License.
1520680c49584c26f7818c2dec8fb00633af753e4aChris Banes */
1620680c49584c26f7818c2dec8fb00633af753e4aChris Banes
1720680c49584c26f7818c2dec8fb00633af753e4aChris Banespackage android.support.v4.app;
1820680c49584c26f7818c2dec8fb00633af753e4aChris Banes
1920680c49584c26f7818c2dec8fb00633af753e4aChris Banesimport android.content.Context;
2020680c49584c26f7818c2dec8fb00633af753e4aChris Banesimport android.os.Build;
2120680c49584c26f7818c2dec8fb00633af753e4aChris Banesimport android.util.AttributeSet;
2220680c49584c26f7818c2dec8fb00633af753e4aChris Banesimport android.view.View;
2320680c49584c26f7818c2dec8fb00633af753e4aChris Banes
2420680c49584c26f7818c2dec8fb00633af753e4aChris Banes/**
2520680c49584c26f7818c2dec8fb00633af753e4aChris Banes * Base class for {@code FragmentActivity} to be able to use v11 APIs.
2653378188683d54e59d5d192cd3a88af3a48c255aClara Bayarri *
2753378188683d54e59d5d192cd3a88af3a48c255aClara Bayarri * @hide
2820680c49584c26f7818c2dec8fb00633af753e4aChris Banes */
29fed04169c31e7e3d8c7a328876358dd3564062bbClara Bayarriabstract class BaseFragmentActivityHoneycomb extends BaseFragmentActivityEclair {
3020680c49584c26f7818c2dec8fb00633af753e4aChris Banes
3120680c49584c26f7818c2dec8fb00633af753e4aChris Banes    @Override
3220680c49584c26f7818c2dec8fb00633af753e4aChris Banes    public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
3320680c49584c26f7818c2dec8fb00633af753e4aChris Banes        final View v = dispatchFragmentsOnCreateView(parent, name, context, attrs);
3420680c49584c26f7818c2dec8fb00633af753e4aChris Banes        if (v == null && Build.VERSION.SDK_INT >= 11) {
3520680c49584c26f7818c2dec8fb00633af753e4aChris Banes            // If we're running on HC or above, let the super have a go
3620680c49584c26f7818c2dec8fb00633af753e4aChris Banes            return super.onCreateView(parent, name, context, attrs);
3720680c49584c26f7818c2dec8fb00633af753e4aChris Banes        }
3820680c49584c26f7818c2dec8fb00633af753e4aChris Banes        return v;
3920680c49584c26f7818c2dec8fb00633af753e4aChris Banes    }
4020680c49584c26f7818c2dec8fb00633af753e4aChris Banes
4120680c49584c26f7818c2dec8fb00633af753e4aChris Banes}
42