diff options
| -rw-r--r-- | packages/SystemUI/res/values-h320dp/config.xml | 22 | ||||
| -rw-r--r-- | packages/SystemUI/res/values-h600dp/config.xml | 22 | ||||
| -rw-r--r-- | packages/SystemUI/res/values-sw410dp/config.xml | 3 | ||||
| -rw-r--r-- | packages/SystemUI/res/values-sw540dp/config.xml | 24 | ||||
| -rw-r--r-- | packages/SystemUI/res/values/config.xml | 1 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java | 6 |
6 files changed, 45 insertions, 33 deletions
diff --git a/packages/SystemUI/res/values-h320dp/config.xml b/packages/SystemUI/res/values-h320dp/config.xml new file mode 100644 index 000000000000..a9c19db0f46f --- /dev/null +++ b/packages/SystemUI/res/values-h320dp/config.xml @@ -0,0 +1,22 @@ +<?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. +*/ +--> + +<resources> + <!-- The number of rows in the QuickSettings --> + <integer name="quick_settings_num_rows">2</integer> +</resources> diff --git a/packages/SystemUI/res/values-h600dp/config.xml b/packages/SystemUI/res/values-h600dp/config.xml new file mode 100644 index 000000000000..8616e3e62779 --- /dev/null +++ b/packages/SystemUI/res/values-h600dp/config.xml @@ -0,0 +1,22 @@ +<?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. +*/ +--> + +<resources> + <!-- The number of rows in the QuickSettings --> + <integer name="quick_settings_num_rows">3</integer> +</resources> diff --git a/packages/SystemUI/res/values-sw410dp/config.xml b/packages/SystemUI/res/values-sw410dp/config.xml index 362c1d214b0e..8ace7bf13573 100644 --- a/packages/SystemUI/res/values-sw410dp/config.xml +++ b/packages/SystemUI/res/values-sw410dp/config.xml @@ -20,8 +20,5 @@ <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources> - <integer name="quick_settings_num_rows">2</integer> - <integer name="quick_settings_num_rows_portrait">3</integer> - <bool name="quick_settings_show_full_alarm">true</bool> </resources> diff --git a/packages/SystemUI/res/values-sw540dp/config.xml b/packages/SystemUI/res/values-sw540dp/config.xml deleted file mode 100644 index e554fc6dd4d1..000000000000 --- a/packages/SystemUI/res/values-sw540dp/config.xml +++ /dev/null @@ -1,24 +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. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <integer name="quick_settings_num_rows">3</integer> -</resources> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 7eb08c4c3582..88e3331ff76c 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -112,7 +112,6 @@ <!-- The number of rows in the QuickSettings --> <integer name="quick_settings_num_rows">1</integer> - <integer name="quick_settings_num_rows_portrait">2</integer> <!-- The number of columns that the top level tiles span in the QuickSettings --> <integer name="quick_settings_user_time_settings_tile_span">1</integer> diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java index 1fd60239ee98..8cfba2cc53d7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java @@ -375,11 +375,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } private int getRows() { - final Resources res = getContext().getResources(); - if (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { - return res.getInteger(R.integer.quick_settings_num_rows_portrait); - } - return Math.max(1, res.getInteger(R.integer.quick_settings_num_rows)); + return Math.max(1, getResources().getInteger(R.integer.quick_settings_num_rows)); } public void setMaxRows(int maxRows) { |