Merge "Update icon for security settings." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-17 22:33:26 +00:00
committed by Android (Google) Code Review
10 changed files with 34 additions and 81 deletions

View File

@@ -20,8 +20,6 @@
android:viewportHeight="24">
<path
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#F09300"
android:pathData="M14,10.5v9.06C12.87,21,12,22,12,22S5,14.25,5,9A7,7,0,0,1,18.93,8H14.29A2.5,2.5,0,1,0,14,10.5ZM16,22h2V20H16Zm0-4h2V10H16Z" />
android:fillColor="#FF000000"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13C19,5.13 15.87,2 12,2zM7,9c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,2.88 -2.88,7.19 -5,9.88C9.92,16.21 7,11.85 7,9zM11,13h2v2h-2V13zM13,6h-2v5h2V6z"/>
</vector>

View File

@@ -20,10 +20,6 @@
android:viewportHeight="24">
<path
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#4285F4"
android:pathData="M12,2 C8.13400675,2 5,5.13400675 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9
C19,5.13400675 15.8659932,2 12,2 L12,2 Z M8.2,9.66 L9.61,8.24 L11,9.66
L15.24,5.42 L16.65,6.83 L11,12.49 L8.2,9.66 Z" />
android:fillColor="#FF000000"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13C19,5.13 15.87,2 12,2zM7,9c0,-2.76 2.24,-5 5,-5s5,2.24 5,5c0,2.88 -2.88,7.19 -5,9.88C9.92,16.21 7,11.85 7,9zM14.5,9c0,1.38 -1.12,2.5 -2.5,2.5S9.5,10.38 9.5,9s1.12,-2.5 2.5,-2.5S14.5,7.62 14.5,9z"/>
</vector>

View File

@@ -20,8 +20,6 @@
android:viewportHeight="24">
<path
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#F09300"
android:pathData="M17,1H7A2,2,0,0,0,5,3V21a2,2,0,0,0,2,2H17a2,2,0,0,0,2-2V3A2,2,0,0,0,17,1Zm0,18H7V5H17Zm-1-6H13V8H11v5H8l4,4Z" />
android:fillColor="#FF000000"
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM7,4V3h10v1H7zM16,12.5l-4,4l-4,-4l1.41,-1.41L11,12.67V8.5V8h2v0.5v4.17l1.59,-1.59L16,12.5z"/>
</vector>

View File

@@ -20,8 +20,6 @@
android:viewportHeight="24">
<path
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#4285F4"
android:pathData="M17,1H7A2,2,0,0,0,5,3V21a2,2,0,0,0,2,2H17a2,2,0,0,0,2-2V3A2,2,0,0,0,17,1ZM9.11,14.06h0l1.41,1.41,5.66-5.66-1.42-1.4-4.24,4.24L9.11,11.24,7.7,12.66ZM17,19H7V5H17Z" />
android:fillColor="#FF000000"
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM7,4V3h10v1H7zM11.14,16l-3.84,-3.84l1.41,-1.42l2.43,2.42l4.16,-4.16l1.42,1.41L11.14,16z"/>
</vector>

View File

@@ -20,8 +20,6 @@
android:viewportHeight="24">
<path
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#F09300"
android:pathData="M17,1a2,2,0,0,1,2,2V21a2,2,0,0,1-2,2H7a2,2,0,0,1-2-2V3A2,2,0,0,1,7,1Zm0,18V5H7V19ZM11,6.5h2v7H11Zm0,9h2v2H11Z" />
android:fillColor="#FF000000"
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM7,4V3h10v1H7zM11,15h2v2h-2V15zM13,8h-2v5h2V8z"/>
</vector>

View File

@@ -14,20 +14,12 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#F5A623"
android:fillType="evenOdd"
android:pathData="M20.5515334,2.919 C15.9049774,0.613 11,0 11,0 C11,0 6.09502262,0.613
1.44846657,2.919 C1.15485168,4.149 1,5.432 1,6.752 C1,8.109 1.16490699,9.429
1.47561589,10.693 C2.13624937,13.382 3.45852187,15.813 5.26143791,17.807
C6.84313725,19.559 8.79788839,20.973 11,21.926 C13.2021116,20.973
15.1568627,19.559 16.7395676,17.807 C18.5414781,15.813 19.8637506,13.382
20.5253896,10.693 C20.835093,9.429 21,8.109 21,6.752 C21,5.432 20.8461538,4.149
20.5515334,2.919 M12,15.5 L10,15.5 L10,13.5 L12,13.5 L12,15.5 L12,15.5 Z M12,12
L10,12 L10,6 L12,6 L12,12 L12,12 Z" />
android:fillColor="#FF000000"
android:pathData="M12,4.24l6,3v4.1c0,3.9 -2.55,7.5 -6,8.59c-3.45,-1.09 -6,-4.7 -6,-8.59v-4.1L12,4.24M12,2L4,6v5.33c0,4.93 3.41,9.55 8,10.67c4.59,-1.12 8,-5.73 8,-10.67V6L12,2L12,2zM11,15h2v2h-2V15zM13,8h-2v5h2V8z"/>
</vector>

View File

@@ -14,22 +14,12 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#4285F4"
android:fillType="evenOdd"
android:pathData="M20.5515334,2.92885159 C20.8461538,4.16300283 21,5.45033294 21,6.77478792
C21,8.13636778 20.835093,9.46082277 20.5253896,10.7290888 C19.8637506,13.4271641
18.5414781,15.8663687 16.7395676,17.8670984 C15.1568627,19.6250114
13.2021116,21.0437836 11,22 C8.79788839,21.0437836 6.84313725,19.6250114
5.26143791,17.8670984 C3.45852187,15.8663687 2.13624937,13.4271641
1.47561589,10.7290888 C1.16490699,9.46082277 1,8.13636778 1,6.77478792
C1,5.45033294 1.15485168,4.16300283 1.44846657,2.92885159
C6.09502262,0.615068868 11,0 11,0 C11,0 15.9049774,0.615068868
20.5515334,2.92885159 Z M15.6984615,6 L9.61538462,12.2961783 L7,10
L5.69846154,11.3471338 L9.61538462,15 L17,7.3566879 L15.6984615,6 Z" />
android:fillColor="#FF000000"
android:pathData="M11.14,16l-3.84,-3.84l1.41,-1.42l2.43,2.42l4.16,-4.16l1.42,1.41L11.14,16zM12,4.24l6,3v4.1c0,3.9 -2.55,7.5 -6,8.59c-3.45,-1.09 -6,-4.7 -6,-8.59v-4.1L12,4.24M12,2L4,6v5.33c0,4.93 3.41,9.55 8,10.67c4.59,-1.12 8,-5.73 8,-10.67V6L12,2L12,2z"/>
</vector>

View File

@@ -14,30 +14,11 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<group
android:translateX="-1"
android:translateY="-1">
<path
android:fillType="evenOdd"
android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" />
<path
android:fillColor="#D84336"
android:fillType="evenOdd"
android:pathData="M21.5515334,3.92885159 C21.8461538,5.16300283 22,6.45033294 22,7.77478792
C22,9.13636778 21.835093,10.4608228 21.5253896,11.7290888 C20.8637506,14.4271641
19.5414781,16.8663687 17.7395676,18.8670984 C16.1568627,20.6250114
14.2021116,22.0437836 12,23 C9.79788839,22.0437836 7.84313725,20.6250114
6.26143791,18.8670984 C4.45852187,16.8663687 3.13624937,14.4271641
2.47561589,11.7290888 C2.16490699,10.4608228 2,9.13636778 2,7.77478792
C2,6.45033294 2.15485168,5.16300283 2.44846657,3.92885159 C7.09502262,1.61506887
12,1 12,1 C12,1 16.9049774,1.61506887 21.5515334,3.92885159 Z M14.6469246,7
L11.9600359,9.71972847 L9.272253,7 L8.00878156,8.28072408 L10.6956703,11.0004526
L8,13.720181 L9.26347144,15 L11.9600359,12.2802715 L14.7347402,15 L16,13.720181
L13.2252957,11.0004526 L15.9121844,8.28072408 L14.6469246,7 Z" />
</group>
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M15.5,9.91L14.09,8.5L12,10.59L9.91,8.5L8.5,9.91L10.59,12L8.5,14.09l1.41,1.41L12,13.42l2.09,2.08l1.41,-1.41L13.42,12L15.5,9.91zM12,4.24l6,3v4.1c0,3.9 -2.55,7.5 -6,8.59c-3.45,-1.09 -6,-4.7 -6,-8.59v-4.1L12,4.24M12,2L4,6v5.33c0,4.93 3.41,9.55 8,10.67c4.59,-1.12 8,-5.73 8,-10.67V6L12,2L12,2z"/>
</vector>

View File

@@ -259,8 +259,10 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
return;
}
tile.icon = Icon.createWithResource(iconInfo.first, iconInfo.second);
ThreadUtils.postOnMainThread(() ->
preference.setIcon(tile.icon.loadDrawable(preference.getContext()))
ThreadUtils.postOnMainThread(() -> {
preference.setIcon(tile.icon.loadDrawable(preference.getContext()));
tile.icon = null;
}
);
});
}

View File

@@ -297,7 +297,7 @@ public class DashboardFeatureProviderImplTest {
"content://com.android.settings/tile_icon");
mImpl.bindIcon(preference, tile);
assertThat(tile.icon).isNotNull();
assertThat(preference.getIcon()).isNotNull();
}
@Test