Merge changes Idbb63960,Id7889566
* changes: Delete some unused resources Move all contextual card related classes.
This commit is contained in:
committed by
Android (Google) Code Review
commit
19e640701e
@@ -3108,7 +3108,7 @@
|
||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
|
||||
<provider
|
||||
android:name=".homepage.CardContentProvider"
|
||||
android:name=".homepage.contextualcards.CardContentProvider"
|
||||
android:authorities="com.android.settings.homepage.CardContentProvider"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.WRITE_SETTINGS_HOMEPAGE_DATA" />
|
||||
|
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
style="@style/SuggestionConditionStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="14dp"
|
||||
android:paddingBottom="@dimen/dashboard_padding_bottom">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="@dimen/suggestion_card_corner_radius">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</FrameLayout>
|
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/SuggestionConditionStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:contentDescription="@string/dashboard_suggestion_condition_footer_content_description"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/collapse_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_expand_less" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/SuggestionConditionStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/condition_header_height"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/icon_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<include layout="@layout/condition_header_icon" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/expand_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:src="@drawable/ic_expand_more"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_toStartOf="@id/expand_indicator"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionTitle"
|
||||
android:textColor="?android:attr/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@android:id/icon_frame"
|
||||
android:layout_toStartOf="@android:id/summary"
|
||||
android:layout_centerVertical="true"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionTitle"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/additional_icons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toStartOf="@android:id/summary"
|
||||
android:layout_toEndOf="@android:id/icon_frame"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:tint="?android:attr/colorAccent" />
|
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/condition_header_height"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:tint="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="62dp"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:alpha=".7"
|
||||
android:textColor="?android:attr/textColorPrimary"/>
|
||||
|
||||
<androidx.appcompat.widget.ButtonBarLayout
|
||||
android:id="@+id/buttonBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="62dp"
|
||||
android:paddingBottom="1dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||
|
||||
<Button
|
||||
android:id="@+id/first_action"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="0dp"
|
||||
android:alpha=".8"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
style="?android:attr/buttonBarButtonStyle"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</androidx.appcompat.widget.ButtonBarLayout>
|
||||
|
||||
<include layout="@layout/horizontal_divider"/>
|
||||
|
||||
</LinearLayout>
|
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 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.
|
||||
-->
|
||||
|
||||
<com.android.settings.homepage.conditional.FocusRecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/dashboard_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:focusable="false"
|
||||
android:paddingStart="@dimen/dashboard_padding_start"
|
||||
android:paddingEnd="@dimen/dashboard_padding_end"
|
||||
android:paddingTop="@dimen/dashboard_padding_top"
|
||||
android:paddingBottom="@dimen/dashboard_padding_bottom"
|
||||
android:scrollbars="vertical"/>
|
@@ -1,21 +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.
|
||||
-->
|
||||
|
||||
<View
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:background="?android:attr/colorSecondary"/>
|
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/dashboard_tile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/dashboard_tile_minimum_height"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/dashboard_tile_image_size"
|
||||
android:layout_height="@dimen/dashboard_tile_image_size"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_marginStart="@dimen/dashboard_tile_image_margin"
|
||||
android:layout_marginEnd="@dimen/dashboard_tile_image_margin" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.TileTitle"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Small"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:paddingEnd="@dimen/dashboard_tile_image_margin" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -1,28 +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.
|
||||
-->
|
||||
|
||||
<!-- Style for a preference category without a header title.
|
||||
Based on tall_preference_category, but invisible and with some 0dp attributes. -->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="0dip"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Body2"
|
||||
android:textColor="?android:attr/colorAccent"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="16dip"
|
||||
android:visible="false" />
|
@@ -16,11 +16,82 @@
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ContextualCardStyle">
|
||||
|
||||
<include layout="@layout/condition_tile"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/condition_header_height"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:tint="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="62dp"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingBottom="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:alpha=".7"
|
||||
android:textColor="?android:attr/textColorPrimary"/>
|
||||
|
||||
<androidx.appcompat.widget.ButtonBarLayout
|
||||
android:id="@+id/buttonBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="62dp"
|
||||
android:paddingBottom="1dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||
|
||||
<Button
|
||||
android:id="@+id/first_action"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="0dp"
|
||||
android:alpha=".8"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
style="?android:attr/buttonBarButtonStyle"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</androidx.appcompat.widget.ButtonBarLayout>
|
||||
|
||||
<include layout="@layout/horizontal_divider"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<ImageView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/dashboard_tile_foreground_image_size"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_marginStart="@dimen/dashboard_tile_image_margin"
|
||||
android:layout_marginEnd="@dimen/dashboard_tile_image_margin" />
|
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 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:id="@+id/main_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"/>
|
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<include layout="@layout/search_icon_view"/>
|
||||
|
||||
<android.app.slice.widget.SliceView
|
||||
android:id="@android:id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="@dimen/preference_no_icon_padding_start"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- Shows the data plan usage in chart -->
|
||||
<com.android.settings.widget.DonutView
|
||||
android:id="@+id/donut"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:gravity="end|center_vertical"
|
||||
settings:applyColorAccent="false"
|
||||
settings:showPercentString="false"
|
||||
settings:thickness="6dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/data_plan_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="2dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Shows the data plan usage -->
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:fontFamily="@*android:string/config_headlineFontFamily"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Title"/>
|
||||
|
||||
<!-- Shows the data plan name -->
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
<!-- Shows the data plan description -->
|
||||
<TextView
|
||||
android:id="@android:id/text2"
|
||||
android:textStyle="italic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="5"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@@ -29,7 +29,7 @@
|
||||
<include layout="@layout/search_bar"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/suggestion_content"
|
||||
android:id="@+id/contextual_cards_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/SuggestionConditionStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="2dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/suggestion_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
</LinearLayout>
|
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/suggestion_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="@dimen/suggestion_card_corner_radius">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="112dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
style="@style/SuggestionCardIcon"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="6dp" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/close_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:contentDescription="@string/dlg_close">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:alpha="0.54"
|
||||
android:src="@drawable/ic_suggestion_close_button"/>
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SuggestionCardText"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionTitle"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SuggestionCardText"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionSummary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/suggestion_card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="@dimen/suggestion_card_corner_radius">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="112dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
style="@style/SuggestionCardIcon"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/close_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="end|top"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:contentDescription="@string/dlg_close">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:alpha="0.54"
|
||||
android:src="@drawable/ic_suggestion_close_button"/>
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/SuggestionCardText"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionTitle"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
@@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/suggestion_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="@dimen/suggestion_card_corner_radius">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="160dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/suggestion_card_icon_size"
|
||||
android:layout_height="@dimen/suggestion_card_icon_size"
|
||||
style="@style/SuggestionCardIcon"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="6dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/close_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:contentDescription="@string/dlg_close">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:alpha="0.54"
|
||||
android:src="@drawable/ic_suggestion_close_button"/>
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SuggestionCardText"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionTitle"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SuggestionCardText"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.SuggestionSummary" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SuggestionCardButton">
|
||||
<Button
|
||||
android:id="@android:id/primary"
|
||||
style="@style/ActionPrimaryButton"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/suggestion_button_text" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="?android:attr/dialogPreferredPadding"
|
||||
android:paddingEnd="?android:attr/dialogPreferredPadding"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"/>
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_alignStart="@id/title"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="4"/>
|
||||
</LinearLayout>
|
@@ -17,10 +17,6 @@
|
||||
<resources>
|
||||
<dimen name="settings_side_margin">112dp</dimen>
|
||||
|
||||
<!-- Dashboard padding in its container -->
|
||||
<dimen name="dashboard_padding_start">160dp</dimen>
|
||||
<dimen name="dashboard_padding_end">160dp</dimen>
|
||||
|
||||
<!-- ActionBar contentInsetStart -->
|
||||
<dimen name="actionbar_contentInsetStart">128dp</dimen>
|
||||
<dimen name="actionbar_subsettings_contentInsetStart">128dp</dimen>
|
||||
|
@@ -31,18 +31,6 @@
|
||||
<dimen name="actionbar_contentInsetStart">80dp</dimen>
|
||||
<dimen name="actionbar_subsettings_contentInsetStart">80dp</dimen>
|
||||
|
||||
<!-- Dashboard margins between each tiles within the layout -->
|
||||
<dimen name="dashboard_cell_gap_x">24dp</dimen>
|
||||
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
||||
|
||||
<!-- Dashboard padding in its container -->
|
||||
<dimen name="dashboard_padding_start">80dp</dimen>
|
||||
<dimen name="dashboard_padding_end">80dp</dimen>
|
||||
|
||||
<!-- Dashboard category padding start / end -->
|
||||
<dimen name="dashboard_category_padding_start">24dp</dimen>
|
||||
<dimen name="dashboard_category_padding_end">24dp</dimen>
|
||||
|
||||
<!-- SwitchBar sub settings margin start / end -->
|
||||
<dimen name="switchbar_subsettings_margin_start">80dp</dimen>
|
||||
<dimen name="switchbar_subsettings_margin_end">80dp</dimen>
|
||||
|
@@ -79,19 +79,6 @@
|
||||
<dimen name="actionbar_contentInsetStart">16dp</dimen>
|
||||
<dimen name="actionbar_subsettings_contentInsetStart">72dp</dimen>
|
||||
|
||||
<!-- Dashboard padding in its container -->
|
||||
<dimen name="dashboard_padding_start">0dp</dimen>
|
||||
<dimen name="dashboard_padding_end">0dp</dimen>
|
||||
<dimen name="dashboard_padding_top">0dp</dimen>
|
||||
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
||||
|
||||
<!-- Dashboard category padding start / end -->
|
||||
<dimen name="dashboard_category_padding_start">0dp</dimen>
|
||||
<dimen name="dashboard_category_padding_end">0dp</dimen>
|
||||
|
||||
<!-- Dashboard tile minimum height -->
|
||||
<dimen name="dashboard_tile_minimum_height">72dp</dimen>
|
||||
|
||||
<!-- Dashboard image tile size -->
|
||||
<dimen name="dashboard_tile_image_size">36dp</dimen>
|
||||
|
||||
@@ -101,9 +88,6 @@
|
||||
<!-- Dashboard foreground image inset (from background edge to foreground edge) -->
|
||||
<dimen name="dashboard_tile_foreground_image_inset">6dp</dimen>
|
||||
|
||||
<!-- Dashboard tile image margin start / end -->
|
||||
<dimen name="dashboard_tile_image_margin">18dp</dimen>
|
||||
|
||||
<!-- SwitchBar sub settings margin start / end -->
|
||||
<dimen name="switchbar_subsettings_margin_start">72dp</dimen>
|
||||
<dimen name="switchbar_subsettings_margin_end">16dp</dimen>
|
||||
|
@@ -25,9 +25,6 @@
|
||||
<!-- Strings for Dialog deny button -->
|
||||
<string name="deny">Deny</string>
|
||||
|
||||
<!-- Strings for Dialog close button [CHAR LIMIT=20] -->
|
||||
<string name="dlg_close">Close</string>
|
||||
|
||||
<!-- Device Info screen. Used for a status item's value when the proper value is not known -->
|
||||
<string name="device_info_default">Unknown</string>
|
||||
<!-- [CHAR LIMIT=NONE] Device Info screen. Countdown for user taps to enable development settings -->
|
||||
@@ -6871,9 +6868,6 @@
|
||||
<item quantity="other">Show %d hidden items</item>
|
||||
</plurals>
|
||||
|
||||
<!-- Content description for suggestion footer button. Double tapping will cause suggestion list to collapse [CHAR LIMIT=NONE]-->
|
||||
<string name="dashboard_suggestion_condition_footer_content_description">Collapse</string>
|
||||
|
||||
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||
<string name="network_dashboard_title">Network & internet</string>
|
||||
<!-- Summary for Network and Internet settings, explaining it contains mobile network setting [CHAR LIMIT=NONE]-->
|
||||
|
@@ -333,10 +333,6 @@
|
||||
<item name="android:padding">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SuggestionConditionStyle">
|
||||
<item name="android:background">?android:attr/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="SuggestionCardText">
|
||||
<item name="android:textAlignment">viewStart</item>
|
||||
</style>
|
||||
|
@@ -75,7 +75,7 @@
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="uri_category"
|
||||
android:layout="@layout/headerless_preference_category"
|
||||
android:layout="@layout/preference_category_no_label"
|
||||
settings:allowDividerAbove="false"
|
||||
settings:allowDividerBelow="false">
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
|
@@ -29,13 +29,11 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.FeatureFlags;
|
||||
import com.android.settings.core.SettingsBaseActivity;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardsFragment;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
public class SettingsHomepageActivity extends SettingsBaseActivity {
|
||||
|
||||
private static final String SUGGESTION_TAG = "suggestion";
|
||||
private static final String MAIN_TAG = "main";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -54,21 +52,21 @@ public class SettingsHomepageActivity extends SettingsBaseActivity {
|
||||
FeatureFactory.getFactory(this).getSearchFeatureProvider()
|
||||
.initSearchToolbar(this, toolbar);
|
||||
|
||||
showFragment(new PersonalSettingsFragment(), R.id.suggestion_content, SUGGESTION_TAG);
|
||||
showFragment(new TopLevelSettings(), R.id.main_content, MAIN_TAG);
|
||||
showFragment(new ContextualCardsFragment(), R.id.contextual_cards_content);
|
||||
showFragment(new TopLevelSettings(), R.id.main_content);
|
||||
}
|
||||
|
||||
public static boolean isDynamicHomepageEnabled(Context context) {
|
||||
return FeatureFlagUtils.isEnabled(context, FeatureFlags.DYNAMIC_HOMEPAGE);
|
||||
}
|
||||
|
||||
private void showFragment(Fragment fragment, int id, String tag) {
|
||||
private void showFragment(Fragment fragment, int id) {
|
||||
final FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
||||
final Fragment showFragment = fragmentManager.findFragmentById(id);
|
||||
|
||||
if (showFragment == null) {
|
||||
fragmentTransaction.add(id, fragment, tag);
|
||||
fragmentTransaction.add(id, fragment);
|
||||
} else {
|
||||
fragmentTransaction.show(showFragment);
|
||||
}
|
||||
|
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
package com.android.settings.homepage.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* Version of RecyclerView that can have listeners for onWindowFocusChanged.
|
||||
*/
|
||||
public class FocusRecyclerView extends RecyclerView {
|
||||
|
||||
private FocusListener mListener;
|
||||
|
||||
public FocusRecyclerView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
if (mListener != null) {
|
||||
mListener.onWindowFocusChanged(hasWindowFocus);
|
||||
}
|
||||
}
|
||||
|
||||
public void setListener(FocusListener listener) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
public interface FocusListener {
|
||||
void onWindowFocusChanged(boolean hasWindowFocus);
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentValues;
|
||||
@@ -41,14 +41,12 @@ public class CardContentProvider extends ContentProvider {
|
||||
public static final String CARD_AUTHORITY = "com.android.settings.homepage.CardContentProvider";
|
||||
|
||||
/** URI matcher for ContentProvider queries. */
|
||||
private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
|
||||
private static final UriMatcher URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
|
||||
/** URI matcher type for cards table */
|
||||
private static final int MATCH_CARDS = 100;
|
||||
/** URI matcher type for card log table */
|
||||
private static final int MATCH_CARD_LOG = 200;
|
||||
|
||||
static {
|
||||
sUriMatcher.addURI(CARD_AUTHORITY, CardDatabaseHelper.CARD_TABLE, MATCH_CARDS);
|
||||
URI_MATCHER.addURI(CARD_AUTHORITY, CardDatabaseHelper.CARD_TABLE, MATCH_CARDS);
|
||||
}
|
||||
|
||||
private CardDatabaseHelper mDBHelper;
|
||||
@@ -170,7 +168,7 @@ public class CardContentProvider extends ContentProvider {
|
||||
|
||||
@VisibleForTesting
|
||||
String getTableFromMatch(Uri uri) {
|
||||
final int match = sUriMatcher.match(uri);
|
||||
final int match = URI_MATCHER.match(uri);
|
||||
String table;
|
||||
switch (match) {
|
||||
case MATCH_CARDS:
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.database.Cursor;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
/**
|
||||
* Data controller for {@link ContextualCard}.
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static android.app.slice.Slice.HINT_ERROR;
|
||||
|
||||
@@ -32,17 +32,17 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.slice.Slice;
|
||||
|
||||
import com.android.settings.homepage.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settingslib.utils.AsyncLoaderCompat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
private static final String TAG = "CardContentLoader";
|
||||
public class ContextualCardLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
private static final String TAG = "ContextualCardLoader";
|
||||
static final int CARD_CONTENT_LOADER_ID = 1;
|
||||
|
||||
private Context mContext;
|
||||
@@ -51,7 +51,7 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
void onFinishCardLoading(List<ContextualCard> contextualCards);
|
||||
}
|
||||
|
||||
CardContentLoader(Context context) {
|
||||
ContextualCardLoader(Context context) {
|
||||
super(context);
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
}
|
||||
}
|
||||
}
|
||||
return filter(result);
|
||||
return filterEligibleCards(result);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -92,8 +92,8 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
final long appVersionCode = getAppVersionCode();
|
||||
final String packageName = mContext.getPackageName();
|
||||
final double rankingScore = 0.0;
|
||||
final List<ContextualCard> result = new ArrayList() {{
|
||||
add(new ContextualCard.Builder()
|
||||
final List<ContextualCard> result = new ArrayList();
|
||||
result.add(new ContextualCard.Builder()
|
||||
.setSliceUri(DataUsageSlice.DATA_USAGE_CARD_URI)
|
||||
.setName(DataUsageSlice.PATH_DATA_USAGE)
|
||||
.setPackageName(packageName)
|
||||
@@ -102,7 +102,7 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
.setCardType(ContextualCard.CardType.SLICE)
|
||||
.setIsHalfWidth(false)
|
||||
.build());
|
||||
add(new ContextualCard.Builder()
|
||||
result.add(new ContextualCard.Builder()
|
||||
.setSliceUri(BatterySlice.BATTERY_CARD_URI)
|
||||
.setName(BatterySlice.PATH_BATTERY_INFO)
|
||||
.setPackageName(packageName)
|
||||
@@ -111,7 +111,7 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
.setCardType(ContextualCard.CardType.SLICE)
|
||||
.setIsHalfWidth(false)
|
||||
.build());
|
||||
add(new ContextualCard.Builder()
|
||||
result.add(new ContextualCard.Builder()
|
||||
.setSliceUri(DeviceInfoSlice.DEVICE_INFO_CARD_URI)
|
||||
.setName(DeviceInfoSlice.PATH_DEVICE_INFO)
|
||||
.setPackageName(packageName)
|
||||
@@ -120,14 +120,13 @@ public class CardContentLoader extends AsyncLoaderCompat<List<ContextualCard>> {
|
||||
.setCardType(ContextualCard.CardType.SLICE)
|
||||
.setIsHalfWidth(false)
|
||||
.build());
|
||||
}};
|
||||
return result;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
List<ContextualCard> filter(List<ContextualCard> candidates) {
|
||||
return candidates.stream().filter(card -> isCardEligibleToDisplay(card)).collect(
|
||||
Collectors.toList());
|
||||
List<ContextualCard> filterEligibleCards(List<ContextualCard> candidates) {
|
||||
return candidates.stream().filter(card -> isCardEligibleToDisplay(card))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import com.android.settings.homepage.ContextualCard.CardType;
|
||||
import com.android.settings.homepage.conditional.ConditionContextualCardController;
|
||||
import com.android.settings.homepage.conditional.ConditionContextualCardRenderer;
|
||||
import com.android.settings.homepage.slices.SliceContextualCardController;
|
||||
import com.android.settings.homepage.slices.SliceContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard.CardType;
|
||||
import com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.slices.SliceContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.slices.SliceContextualCardRenderer;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.android.settings.homepage.CardContentLoader.CARD_CONTENT_LOADER_ID;
|
||||
import static com.android.settings.homepage.contextualcards.ContextualCardLoader.CARD_CONTENT_LOADER_ID;
|
||||
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* This is a centralized manager of multiple {@link ContextualCardController}.
|
||||
*
|
||||
* {@link ContextualCardManager} first loads data from {@link CardContentLoader} and gets back a
|
||||
* {@link ContextualCardManager} first loads data from {@link ContextualCardLoader} and gets back a
|
||||
* list of {@link ContextualCard}. All subclasses of {@link ContextualCardController} are loaded
|
||||
* here, which will then trigger the {@link ContextualCardController} to load its data and listen to
|
||||
* corresponding changes. When every single {@link ContextualCardController} updates its data, the
|
||||
@@ -52,7 +52,7 @@ import java.util.stream.Collectors;
|
||||
* {@link ContextualCardsAdapter} and {@link BaseAdapter#notifyDataSetChanged()} will be called to
|
||||
* get the page refreshed.
|
||||
*/
|
||||
public class ContextualCardManager implements CardContentLoader.CardContentLoaderListener,
|
||||
public class ContextualCardManager implements ContextualCardLoader.CardContentLoaderListener,
|
||||
ContextualCardUpdateListener {
|
||||
|
||||
private static final String TAG = "ContextualCardManager";
|
||||
@@ -80,7 +80,7 @@ public class ContextualCardManager implements CardContentLoader.CardContentLoade
|
||||
}
|
||||
}
|
||||
|
||||
void loadContextualCards(PersonalSettingsFragment fragment) {
|
||||
void loadContextualCards(ContextualCardsFragment fragment) {
|
||||
final CardContentLoaderCallbacks cardContentLoaderCallbacks =
|
||||
new CardContentLoaderCallbacks(mContext);
|
||||
cardContentLoaderCallbacks.setListener(this);
|
||||
@@ -157,13 +157,13 @@ public class ContextualCardManager implements CardContentLoader.CardContentLoade
|
||||
LoaderManager.LoaderCallbacks<List<ContextualCard>> {
|
||||
|
||||
private Context mContext;
|
||||
private CardContentLoader.CardContentLoaderListener mListener;
|
||||
private ContextualCardLoader.CardContentLoaderListener mListener;
|
||||
|
||||
CardContentLoaderCallbacks(Context context) {
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
|
||||
protected void setListener(CardContentLoader.CardContentLoaderListener listener) {
|
||||
protected void setListener(ContextualCardLoader.CardContentLoaderListener listener) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ public class ContextualCardManager implements CardContentLoader.CardContentLoade
|
||||
@Override
|
||||
public Loader<List<ContextualCard>> onCreateLoader(int id, @Nullable Bundle bundle) {
|
||||
if (id == CARD_CONTENT_LOADER_ID) {
|
||||
return new CardContentLoader(mContext);
|
||||
return new ContextualCardLoader(mContext);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unknown loader id: " + id);
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.view.View;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
|
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.android.settings.homepage.ContextualCardsAdapter.SPAN_COUNT;
|
||||
import static com.android.settings.homepage.contextualcards.ContextualCardsAdapter.SPAN_COUNT;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -30,9 +30,9 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
|
||||
public class PersonalSettingsFragment extends InstrumentedFragment {
|
||||
public class ContextualCardsFragment extends InstrumentedFragment {
|
||||
|
||||
private static final String TAG = "PersonalSettingsFragment";
|
||||
private static final String TAG = "ContextualCardsFragment";
|
||||
|
||||
private RecyclerView mCardsContainer;
|
||||
private GridLayoutManager mLayoutManager;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
@@ -22,10 +22,10 @@ import android.util.Log;
|
||||
import androidx.collection.ArraySet;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.android.settings.homepage.conditional.ConditionContextualCardController;
|
||||
import com.android.settings.homepage.conditional.ConditionContextualCardRenderer;
|
||||
import com.android.settings.homepage.slices.SliceContextualCardController;
|
||||
import com.android.settings.homepage.slices.SliceContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.slices.SliceContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.slices.SliceContextualCardRenderer;
|
||||
|
||||
import java.util.Set;
|
||||
|
@@ -20,11 +20,11 @@ import static android.provider.SettingsSlicesContract.KEY_WIFI;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
|
||||
import com.android.settings.homepage.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.deviceinfo.StorageSlice;
|
||||
import com.android.settings.homepage.deviceinfo.EmergencyInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.EmergencyInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.StorageSlice;
|
||||
import com.android.settings.intelligence.ContextualCardProto.ContextualCard;
|
||||
import com.android.settings.intelligence.ContextualCardProto.ContextualCardList;
|
||||
import com.android.settings.wifi.WifiSlice;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.PowerManager;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.ContextualCardController;
|
||||
import com.android.settings.homepage.ContextualCardUpdateListener;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardUpdateListener;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
@@ -27,9 +27,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.ControllerRendererPool;
|
||||
import com.android.settings.homepage.ContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.ControllerRendererPool;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
public interface ConditionListener {
|
||||
void onConditionsChanged();
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
|
@@ -14,11 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
|
||||
/**
|
||||
* Data class representing a conditional {@link ContextualCard}.
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.content.BroadcastReceiver;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static android.content.Context.NOTIFICATION_SERVICE;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
@@ -14,13 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.slices;
|
||||
package com.android.settings.homepage.contextualcards.slices;
|
||||
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.ContextualCardController;
|
||||
import com.android.settings.homepage.ContextualCardUpdateListener;
|
||||
|
||||
import java.util.List;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardController;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardUpdateListener;
|
||||
|
||||
/**
|
||||
* Card controller for {@link ContextualCard} built as slices.
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.slices;
|
||||
package com.android.settings.homepage.contextualcards.slices;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -35,8 +35,8 @@ import androidx.slice.widget.SliceLiveData;
|
||||
import androidx.slice.widget.SliceView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.ContextualCardRenderer;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardRenderer;
|
||||
|
||||
import java.util.Map;
|
||||
|
@@ -20,10 +20,10 @@ import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.android.settings.homepage.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.deviceinfo.StorageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.StorageSlice;
|
||||
import com.android.settings.wifi.WifiSlice;
|
||||
|
||||
import java.util.Map;
|
||||
|
@@ -42,7 +42,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.bluetooth.BluetoothSliceBuilder;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.flashlight.FlashlightSliceBuilder;
|
||||
import com.android.settings.homepage.deviceinfo.EmergencyInfoSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.EmergencyInfoSlice;
|
||||
import com.android.settings.location.LocationSliceBuilder;
|
||||
import com.android.settings.network.telephony.Enhanced4gLteSliceHelper;
|
||||
import com.android.settings.notification.ZenModeSliceBuilder;
|
||||
|
@@ -12,10 +12,9 @@
|
||||
* 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.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -12,10 +12,9 @@
|
||||
* 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.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.android.settings.homepage.conditional.ConditionalContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.conditional.ConditionalContextualCard;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
|
||||
import org.junit.Test;
|
@@ -14,17 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage;
|
||||
package com.android.settings.homepage.contextualcards;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.android.settings.homepage.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.homepage.deviceinfo.StorageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.BatterySlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DataUsageSlice;
|
||||
import com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSlice;
|
||||
import com.android.settings.slices.SettingsSliceProvider;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
|
||||
@@ -39,16 +38,16 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
public class CardContentLoaderTest {
|
||||
public class ContextualCardLoaderTest {
|
||||
|
||||
private Context mContext;
|
||||
private CardContentLoader mCardContentLoader;
|
||||
private ContextualCardLoader mContextualCardLoader;
|
||||
private SettingsSliceProvider mProvider;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mCardContentLoader = new CardContentLoader(mContext);
|
||||
mContextualCardLoader = new ContextualCardLoader(mContext);
|
||||
mProvider = new SettingsSliceProvider();
|
||||
ShadowContentResolver.registerProviderInternal(SettingsSliceProvider.SLICE_AUTHORITY,
|
||||
mProvider);
|
||||
@@ -56,7 +55,7 @@ public class CardContentLoaderTest {
|
||||
|
||||
@Test
|
||||
public void createStaticCards_shouldReturnFourCards() {
|
||||
final List<ContextualCard> defaultData = mCardContentLoader.createStaticCards();
|
||||
final List<ContextualCard> defaultData = mContextualCardLoader.createStaticCards();
|
||||
|
||||
assertThat(defaultData).hasSize(3);
|
||||
}
|
||||
@@ -68,7 +67,7 @@ public class CardContentLoaderTest {
|
||||
final Uri batteryInfo = BatterySlice.BATTERY_CARD_URI;
|
||||
final List<Uri> expectedUris = Arrays.asList(dataUsage, deviceInfo, batteryInfo);
|
||||
|
||||
final List<Uri> actualCardUris = mCardContentLoader.createStaticCards().stream().map(
|
||||
final List<Uri> actualCardUris = mContextualCardLoader.createStaticCards().stream().map(
|
||||
ContextualCard::getSliceUri).collect(Collectors.toList());
|
||||
|
||||
assertThat(actualCardUris).containsExactlyElementsIn(expectedUris);
|
||||
@@ -83,7 +82,7 @@ public class CardContentLoaderTest {
|
||||
.setSummaryText("custom_summary")
|
||||
.build();
|
||||
|
||||
assertThat(mCardContentLoader.isCardEligibleToDisplay(customCard)).isTrue();
|
||||
assertThat(mContextualCardLoader.isCardEligibleToDisplay(customCard)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -91,7 +90,7 @@ public class CardContentLoaderTest {
|
||||
final String sliceUri = "contet://com.android.settings.slices/action/flashlight";
|
||||
|
||||
assertThat(
|
||||
mCardContentLoader.isCardEligibleToDisplay(getContextualCard(sliceUri))).isFalse();
|
||||
mContextualCardLoader.isCardEligibleToDisplay(getContextualCard(sliceUri))).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -99,7 +98,7 @@ public class CardContentLoaderTest {
|
||||
final String sliceUri = "content://com.android.settings.test.slices/action/flashlight";
|
||||
|
||||
assertThat(
|
||||
mCardContentLoader.isCardEligibleToDisplay(getContextualCard(sliceUri))).isFalse();
|
||||
mContextualCardLoader.isCardEligibleToDisplay(getContextualCard(sliceUri))).isFalse();
|
||||
}
|
||||
|
||||
private ContextualCard getContextualCard(String sliceUri) {
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.never;
|
||||
@@ -26,7 +26,7 @@ import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.homepage.ContextualCardUpdateListener;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardUpdateListener;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
|
||||
import org.junit.Before;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -31,8 +31,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.ControllerRendererPool;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ControllerRendererPool;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
|
||||
import org.junit.Before;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.conditional;
|
||||
package com.android.settings.homepage.contextualcards.conditional;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.argThat;
|
||||
import static org.mockito.Mockito.spy;
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.deviceinfo;
|
||||
package com.android.settings.homepage.contextualcards.deviceinfo;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.homepage.slices;
|
||||
package com.android.settings.homepage.contextualcards.slices;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -31,8 +31,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.slice.Slice;
|
||||
|
||||
import com.android.settings.homepage.ContextualCard;
|
||||
import com.android.settings.homepage.PersonalSettingsFragment;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCard;
|
||||
import com.android.settings.homepage.contextualcards.ContextualCardsFragment;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -56,7 +56,7 @@ public class SliceContextualCardRendererTest {
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mLifecycleOwner = new PersonalSettingsFragment();
|
||||
mLifecycleOwner = new ContextualCardsFragment();
|
||||
mRenderer = new SliceContextualCardRenderer(mContext, mLifecycleOwner);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user