1/*
2 * Copyright (C) 2008 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
17package com.android.launcher2;
18
19import com.android.launcher.R;
20
21import android.app.Activity;
22import android.app.DialogFragment;
23import android.app.Fragment;
24import android.os.Bundle;
25
26public class WallpaperChooser extends Activity {
27    @SuppressWarnings("unused")
28    private static final String TAG = "Launcher.WallpaperChooser";
29
30    @Override
31    public void onCreate(Bundle icicle) {
32        super.onCreate(icicle);
33        setContentView(R.layout.wallpaper_chooser_base);
34
35        Fragment fragmentView =
36                getFragmentManager().findFragmentById(R.id.wallpaper_chooser_fragment);
37        // TODO: The following code is currently not exercised. Leaving it here in case it
38        // needs to be revived again.
39        if (fragmentView == null) {
40            /* When the screen is XLarge, the fragment is not included in the layout, so show it
41             * as a dialog
42             */
43            DialogFragment fragment = WallpaperChooserDialogFragment.newInstance();
44            fragment.show(getFragmentManager(), "dialog");
45        }
46    }
47}
48