diff options
-rw-r--r-- | res/layout/manage_assist_footer.xml | 31 | ||||
-rw-r--r-- | res/xml/manage_assist.xml | 7 | ||||
-rw-r--r-- | src/com/android/settings/InstrumentedFragment.java | 2 | ||||
-rw-r--r-- | src/com/android/settings/applications/ManageAssist.java | 16 |
4 files changed, 9 insertions, 47 deletions
diff --git a/res/layout/manage_assist_footer.xml b/res/layout/manage_assist_footer.xml deleted file mode 100644 index 8e10d62..0000000 --- a/res/layout/manage_assist_footer.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - ~ Copyright (C) 2015 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 - --> -<TextView - xmlns:android="http://schemas.android.com/apk/res/android" - style="@android:style/TextAppearance.Material.Body1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="?android:attr/textColorSecondary" - android:paddingTop="16dp" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:paddingBottom="16dp" - android:selectable="false" - android:clickable="false" - android:text="@string/assist_footer"> -</TextView>
\ No newline at end of file diff --git a/res/xml/manage_assist.xml b/res/xml/manage_assist.xml index 00e86ad..e3ee859 100644 --- a/res/xml/manage_assist.xml +++ b/res/xml/manage_assist.xml @@ -23,5 +23,10 @@ android:key="context" android:title="@string/assist_access_context_title" android:summary="@string/assist_access_context_summary" - android:persistent="false" /> + android:persistent="false"/> + + <Preference + android:summary="@string/assist_footer" + android:selectable="false"/> + </PreferenceScreen> diff --git a/src/com/android/settings/InstrumentedFragment.java b/src/com/android/settings/InstrumentedFragment.java index da2a340..2da39da 100644 --- a/src/com/android/settings/InstrumentedFragment.java +++ b/src/com/android/settings/InstrumentedFragment.java @@ -26,6 +26,8 @@ public abstract class InstrumentedFragment extends PreferenceFragment { // Declare new temporary categories here, starting after this value. public static final int UNDECLARED = 100000; + public static final int APPLICATIONS_MANAGE_ASSIST = UNDECLARED+1; + /** * Declare the view of this category. * diff --git a/src/com/android/settings/applications/ManageAssist.java b/src/com/android/settings/applications/ManageAssist.java index e222e1c..f06b95e 100644 --- a/src/com/android/settings/applications/ManageAssist.java +++ b/src/com/android/settings/applications/ManageAssist.java @@ -16,17 +16,11 @@ package com.android.settings.applications; -import android.annotation.Nullable; import android.os.Bundle; import android.preference.Preference; import android.preference.SwitchPreference; import android.provider.Settings; -import android.text.method.LinkMovementMethod; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.TextView; -import com.android.internal.logging.MetricsLogger; import com.android.settings.InstrumentedFragment; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; @@ -52,16 +46,8 @@ public class ManageAssist extends SettingsPreferenceFragment } @Override - public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - TextView v = (TextView) LayoutInflater.from(view.getContext()).inflate( - R.layout.manage_assist_footer, null); - getListView().addFooterView(v); - } - - @Override protected int getMetricsCategory() { - return MetricsLogger.APPLICATIONS_MANAGE_ASSIST; + return InstrumentedFragment.APPLICATIONS_MANAGE_ASSIST; } @Override |