Remove DashboardStatusFragment and hide sliding tab layout.

Bug: 28090184
Change-Id: I34ff46d0f5ba87c824d1484f1018fad154696e15
This commit is contained in:
Fan Zhang
2016-04-11 09:17:57 -07:00
parent 872c61249b
commit 3645373b6f
5 changed files with 2 additions and 76 deletions

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

View File

@@ -7369,8 +7369,6 @@
<string name="notification_suggestion_title">Control lock screen notifications</string> <string name="notification_suggestion_title">Control lock screen notifications</string>
<!-- Summary of notification suggestion during optional steps of setup. [CHAR_LIMIT=80] --> <!-- Summary of notification suggestion during optional steps of setup. [CHAR_LIMIT=80] -->
<string name="notification_suggestion_summary">Show or hide notification content</string> <string name="notification_suggestion_summary">Show or hide notification content</string>
<!-- Setting tab title for general status. [CHAR LIMIT=20] -->
<string name="page_tab_title_status">Status</string>
<!-- Setting tab title for all setting options. [CHAR LIMIT=20] --> <!-- Setting tab title for all setting options. [CHAR LIMIT=20] -->
<string name="page_tab_title_summary">All</string> <string name="page_tab_title_summary">All</string>

View File

@@ -31,7 +31,6 @@ public abstract class InstrumentedFragment extends PreferenceFragment {
public static final int DASHBOARD_CONTAINER = UNDECLARED + 1; public static final int DASHBOARD_CONTAINER = UNDECLARED + 1;
// Used by PreferenceActivity for the dummy fragment it adds, no useful data here. // Used by PreferenceActivity for the dummy fragment it adds, no useful data here.
public static final int PREFERENCE_ACTIVITY_FRAGMENT = UNDECLARED + 2; public static final int PREFERENCE_ACTIVITY_FRAGMENT = UNDECLARED + 2;
public static final int DASHBOARD_STATUS = UNDECLARED + 3;
/** /**
* Declare the view of this category. * Declare the view of this category.

View File

@@ -33,15 +33,13 @@ import com.android.settings.InstrumentedFragment;
import com.android.settings.R; import com.android.settings.R;
import com.android.settings.widget.SlidingTabLayout; import com.android.settings.widget.SlidingTabLayout;
import com.android.settingslib.HelpUtils; import com.android.settingslib.HelpUtils;
import com.android.settingslib.drawer.SettingsDrawerActivity;
/** /**
* Container for Dashboard fragments. * Container for Dashboard fragments.
*/ */
public final class DashboardContainerFragment extends InstrumentedFragment { public final class DashboardContainerFragment extends InstrumentedFragment {
private static final int INDEX_BRIEF_FRAGMENT = 0; private static final int INDEX_SUMMARY_FRAGMENT = 0;
private static final int INDEX_SUMMARY_FRAGMENT = 1;
private ViewPager mViewPager; private ViewPager mViewPager;
private View mHeaderView; private View mHeaderView;
@@ -73,9 +71,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
final Activity activity = getActivity(); final Activity activity = getActivity();
if (activity instanceof SettingsDrawerActivity) {
((SettingsDrawerActivity) getActivity()).setContentHeaderView(mHeaderView);
}
} }
@Override @Override
@@ -98,8 +93,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override @Override
public CharSequence getPageTitle(int position) { public CharSequence getPageTitle(int position) {
switch (position) { switch (position) {
case INDEX_BRIEF_FRAGMENT:
return mContext.getString(R.string.page_tab_title_status);
case INDEX_SUMMARY_FRAGMENT: case INDEX_SUMMARY_FRAGMENT:
return mContext.getString(R.string.page_tab_title_summary); return mContext.getString(R.string.page_tab_title_summary);
} }
@@ -109,8 +102,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override @Override
public Fragment getItem(int position) { public Fragment getItem(int position) {
switch (position) { switch (position) {
case INDEX_BRIEF_FRAGMENT:
return new DashboardStatusFragment();
case INDEX_SUMMARY_FRAGMENT: case INDEX_SUMMARY_FRAGMENT:
return new DashboardSummary(); return new DashboardSummary();
default: default:
@@ -123,7 +114,7 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override @Override
public int getCount() { public int getCount() {
return 2; return 1;
} }
} }
} }

View File

@@ -1,41 +0,0 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.dashboard;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.android.settings.InstrumentedFragment;
import com.android.settings.R;
/**
* Dashboard fragment for showing status and suggestions.
*/
public final class DashboardStatusFragment extends InstrumentedFragment {
@Override
protected int getMetricsCategory() {
return DASHBOARD_STATUS;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
return inflater.inflate(R.layout.dashboard_status, parent, false);
}
}