blob: fe81ccbb56e8be2ff6b565fc7a0198cd5fb2d69e [file] [log] [blame]
The Android Open Source Project31dd5032009-03-03 19:32:27 -08001/*
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
Daniel Sandler325dc232013-06-05 22:57:57 -040017package com.android.launcher3;
The Android Open Source Project31dd5032009-03-03 19:32:27 -080018
Daniel Sandler325dc232013-06-05 22:57:57 -040019import com.android.launcher3.R;
Romain Guyedcce092010-03-04 13:03:17 -080020
Adam Lesinski2a898a02010-12-09 21:04:15 -080021import android.app.Activity;
22import android.app.DialogFragment;
23import android.app.Fragment;
24import android.os.Bundle;
25
Adam Lesinskicd5d8072010-11-19 15:06:46 -080026public class WallpaperChooser extends Activity {
Michael Jurka3a9fced2012-04-13 14:44:29 -070027 @SuppressWarnings("unused")
Joe Onoratoa30ce8e2009-11-11 08:16:49 -080028 private static final String TAG = "Launcher.WallpaperChooser";
The Android Open Source Project31dd5032009-03-03 19:32:27 -080029
The Android Open Source Project31dd5032009-03-03 19:32:27 -080030 @Override
31 public void onCreate(Bundle icicle) {
32 super.onCreate(icicle);
Adam Lesinskicd5d8072010-11-19 15:06:46 -080033 setContentView(R.layout.wallpaper_chooser_base);
The Android Open Source Project31dd5032009-03-03 19:32:27 -080034
Adam Lesinski2a898a02010-12-09 21:04:15 -080035 Fragment fragmentView =
36 getFragmentManager().findFragmentById(R.id.wallpaper_chooser_fragment);
Amith Yamasani6be59492011-06-21 13:03:34 -070037 // TODO: The following code is currently not exercised. Leaving it here in case it
38 // needs to be revived again.
Adam Lesinski2a898a02010-12-09 21:04:15 -080039 if (fragmentView == null) {
40 /* When the screen is XLarge, the fragment is not included in the layout, so show it
41 * as a dialog
Adam Lesinskicd5d8072010-11-19 15:06:46 -080042 */
Adam Lesinski2a898a02010-12-09 21:04:15 -080043 DialogFragment fragment = WallpaperChooserDialogFragment.newInstance();
44 fragment.show(getFragmentManager(), "dialog");
Romain Guye82140f2009-09-16 16:54:21 -070045 }
Romain Guy8c724f52009-09-14 15:18:12 -070046 }
The Android Open Source Project31dd5032009-03-03 19:32:27 -080047}