2 * Copyright (C) 2017 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.
16 package com.android.settings.dashboard;
18 import android.app.Activity;
19 import android.content.Intent;
20 import android.os.Bundle;
21 import com.android.settings.Settings.LegacySupportActivity;
22 import com.android.settings.overlay.FeatureFactory;
23 import com.android.settings.overlay.SupportFeatureProvider;
26 * Trampoline activity that decides which version of support should be shown to the user.
28 public class SupportDashboardActivity extends Activity {
31 protected void onCreate(Bundle savedInstanceState) {
32 super.onCreate(savedInstanceState);
33 SupportFeatureProvider supportFeatureProvider = FeatureFactory.getFactory(this)
34 .getSupportFeatureProvider(this);
36 // try to launch support v2 if we have the feature provider
37 if (supportFeatureProvider != null && supportFeatureProvider.isSupportV2Enabled()) {
38 supportFeatureProvider.startSupportV2(this);
40 startActivity(new Intent(this, LegacySupportActivity.class));