Merge "Fixed UserRestrictions ListView." into sc-v2-dev
diff --git a/tests/EmbeddedKitchenSinkApp/res/layout/user_restrictions.xml b/tests/EmbeddedKitchenSinkApp/res/layout/user_restrictions.xml
index e144acd..3c57e71 100644
--- a/tests/EmbeddedKitchenSinkApp/res/layout/user_restrictions.xml
+++ b/tests/EmbeddedKitchenSinkApp/res/layout/user_restrictions.xml
@@ -19,9 +19,8 @@
android:orientation="vertical" >
<ListView
android:id="@+id/user_restrictions_list"
- android:layout_height="0dp"
+ android:layout_height="match_parent"
android:layout_width="match_parent"
- android:layout_weight="1"
android:scrollbars="vertical"/>
<Button
@@ -30,6 +29,5 @@
android:layout_height="wrap_content"
android:padding="@dimen/users_button_padding"
android:textSize="@dimen/users_button_text_size"
- android:layout_weight="0"
android:text="@string/users_apply_button" />
</LinearLayout>
diff --git a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/UserRestrictionsFragment.java b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/UserRestrictionsFragment.java
index 0b412d0..1ce98d0 100644
--- a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/UserRestrictionsFragment.java
+++ b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/UserRestrictionsFragment.java
@@ -32,6 +32,7 @@
import com.google.android.car.kitchensink.R;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@@ -57,6 +58,11 @@
UserManager.DISALLOW_USER_SWITCH
);
+ static {
+ Collections.sort(CONFIGURABLE_USER_RESTRICTIONS);
+ Log.d(TAG, "Configurable user restrictions: " + CONFIGURABLE_USER_RESTRICTIONS);
+ }
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,