Loading res/layout/regulatory_info.xml +4 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ limitations under the License. --> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="centerCrop" android:src="@drawable/regulatory_info"/> res/xml/device_info_settings.xml +2 −3 Original line number Diff line number Diff line Loading @@ -89,9 +89,8 @@ </PreferenceScreen> --> <Preference android:key="regulatory_info" android:title="@string/regulatory_information" android:fragment="com.android.settings.RegulatoryInfoFragment"/> <com.android.settings.RegulatoryInfoPreference android:key="regulatory_info" android:title="@string/regulatory_information" /> <!-- Device hardware model --> <Preference android:key="device_model" Loading src/com/android/settings/RegulatoryInfoFragment.java→src/com/android/settings/RegulatoryInfoPreference.java +10 −15 Original line number Diff line number Diff line Loading @@ -16,24 +16,19 @@ package com.android.settings; import android.app.DialogFragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.android.settings.R; import android.content.Context; import android.preference.DialogPreference; import android.util.AttributeSet; /** * {@link DialogFragment} that displays regulatory information. * "About phone" will show a preference that displays this fragment when * clicked if R.bool.config_show_regulatory_info is true. * {@link DialogPreference} that displays regulatory information. "About phone" * will show a "Regulatory information" preference if * R.bool.config_show_regulatory_info is true. */ public class RegulatoryInfoFragment extends DialogFragment { public class RegulatoryInfoPreference extends DialogPreference { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.regulatory_info, container, false); public RegulatoryInfoPreference(Context context, AttributeSet attrs) { super(context, attrs, com.android.internal.R.attr.preferenceStyle); setDialogLayoutResource(R.layout.regulatory_info); } } Loading
res/layout/regulatory_info.xml +4 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ limitations under the License. --> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="centerCrop" android:src="@drawable/regulatory_info"/>
res/xml/device_info_settings.xml +2 −3 Original line number Diff line number Diff line Loading @@ -89,9 +89,8 @@ </PreferenceScreen> --> <Preference android:key="regulatory_info" android:title="@string/regulatory_information" android:fragment="com.android.settings.RegulatoryInfoFragment"/> <com.android.settings.RegulatoryInfoPreference android:key="regulatory_info" android:title="@string/regulatory_information" /> <!-- Device hardware model --> <Preference android:key="device_model" Loading
src/com/android/settings/RegulatoryInfoFragment.java→src/com/android/settings/RegulatoryInfoPreference.java +10 −15 Original line number Diff line number Diff line Loading @@ -16,24 +16,19 @@ package com.android.settings; import android.app.DialogFragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.android.settings.R; import android.content.Context; import android.preference.DialogPreference; import android.util.AttributeSet; /** * {@link DialogFragment} that displays regulatory information. * "About phone" will show a preference that displays this fragment when * clicked if R.bool.config_show_regulatory_info is true. * {@link DialogPreference} that displays regulatory information. "About phone" * will show a "Regulatory information" preference if * R.bool.config_show_regulatory_info is true. */ public class RegulatoryInfoFragment extends DialogFragment { public class RegulatoryInfoPreference extends DialogPreference { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.regulatory_info, container, false); public RegulatoryInfoPreference(Context context, AttributeSet attrs) { super(context, attrs, com.android.internal.R.attr.preferenceStyle); setDialogLayoutResource(R.layout.regulatory_info); } }