Skip to content

Commit

Permalink
Merge 'lineage-16.0' into 9.0
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
  • Loading branch information
neobuddy89 committed Jun 2, 2019
2 parents 53da896 + f7fc27e commit 79ad993
Show file tree
Hide file tree
Showing 36 changed files with 1,075 additions and 98 deletions.
Expand Up @@ -558,12 +558,10 @@ private MetricsLogger getMetricsLogger() {
}

/**
* Returns {@code true} if Night display is supported by the device,
* unless LiveDisplay feature is available.
* Returns {@code true} if Night display is supported by the device.
*/
public static boolean isAvailable(Context context) {
return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable) &&
!context.getPackageManager().hasSystemFeature("org.lineageos.livedisplay");
return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable);
}

/**
Expand Down
29 changes: 29 additions & 0 deletions packages/SystemUI/res/drawable/ic_qs_location_battery_saving.xml
@@ -0,0 +1,29 @@
<!--
Copyright (C) 2017 The LineageOS Project
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">

<path
android:fillColor="#4DFFFFFF"
android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0s14.0,-15.5 14.0,-26.0C38.0,10.3 31.7,4.0 24.0,4.0zM24.0,23.0c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0c2.8,0.0 5.0,2.2 5.0,5.0S26.8,23.0 24.0,23.0z"/>
<path
android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0l0.0,-21.0 c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0l0.0,-9.0z"
android:fillColor="#FFFFFFFF"/>
</vector>
29 changes: 29 additions & 0 deletions packages/SystemUI/res/drawable/ic_qs_location_sensors_only.xml
@@ -0,0 +1,29 @@
<!--
Copyright (C) 2017 The LineageOS Project
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">

<path
android:fillColor="#FFFFFFFF"
android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0s14.0,-15.5 14.0,-26.0C38.0,10.3 31.7,4.0 24.0,4.0zM24.0,23.0c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0c2.8,0.0 5.0,2.2 5.0,5.0S26.8,23.0 24.0,23.0z"/>
<path
android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0l0.0,-21.0 c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0l0.0,-9.0z"
android:fillColor="#4DFFFFFF"/>
</vector>
32 changes: 32 additions & 0 deletions packages/SystemUI/res/drawable/ic_qs_profiles.xml
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2015 The CyanogenMod Project
Copyright (C) 2017-2018 The LineageOS 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="#FFFFFFFF"
android:pathData="M19,5v14H5V5H19
M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z
M17,8 c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1s0.4,1,1,1C16.6,9,17,8.6,17,8z
M13,8c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1s0.4,1,1,1 C12.6,9,13,8.6,13,8z
M9,8c0-0.6-0.4-1-1-1S7,7.4,7,8s0.4,1,1,1S9,8.6,9,8z
M17,13h-6v-2H9v2H7v2h2v2h2v-2h6V13z" />
</vector>
6 changes: 3 additions & 3 deletions packages/SystemUI/res/drawable/qs_detail_background.xml
Expand Up @@ -14,6 +14,6 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/qs_detail_transition" />
<item android:drawable="?android:attr/colorPrimary" />
</transition>
<item android:drawable="@drawable/qs_detail_background_transition" />
<item android:drawable="@drawable/qs_detail_background_primary" />
</transition>
21 changes: 21 additions & 0 deletions packages/SystemUI/res/drawable/qs_detail_background_primary.xml
@@ -0,0 +1,21 @@
<?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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape>
<solid android:color="?android:attr/colorPrimary"/>
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
</inset>
21 changes: 21 additions & 0 deletions packages/SystemUI/res/drawable/qs_detail_background_transition.xml
@@ -0,0 +1,21 @@
<?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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape>
<solid android:color="@color/qs_detail_transition"/>
<corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
</inset>
23 changes: 23 additions & 0 deletions packages/SystemUI/res/drawable/qs_detail_toolbar.xml
@@ -0,0 +1,23 @@
<?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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape>
<solid android:color="?android:attr/colorSecondary"/>
<corners
android:topLeftRadius="?android:attr/dialogCornerRadius"
android:topRightRadius="?android:attr/dialogCornerRadius" />
</shape>
</inset>
64 changes: 64 additions & 0 deletions packages/SystemUI/res/layout/location_mode_panel.xml
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 The LineageOS Project
Copyright (C) 2015-2017 The ParanoidAndroid 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/location_mode_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:orientation="vertical" >

<com.android.systemui.volume.SegmentedButtons
android:id="@+id/location_buttons"
android:background="@drawable/segmented_buttons_background"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" />

<RelativeLayout
android:id="@+id/location_introduction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:background="@drawable/zen_introduction_message_background" >

<TextView
android:id="@+id/location_introduction_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:textDirection="locale"
android:lineSpacingMultiplier="1.20029"
android:textAppearance="@style/TextAppearance.QS.Introduction" />

<View
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_below="@id/location_introduction_message"
android:layout_alignParentEnd="true" />

</RelativeLayout>
</LinearLayout>
Expand Up @@ -17,6 +17,7 @@

<merge xmlns:android="http://schemas.android.com/apk/res/android">->
<View
android:id="@+id/qs_customizer_top_space"
android:layout_width="match_parent"
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:background="@android:color/transparent" />
Expand Down
60 changes: 37 additions & 23 deletions packages/SystemUI/res/layout/qs_detail.xml
Expand Up @@ -19,42 +19,56 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/qs_detail_background"
android:clickable="true"
android:orientation="vertical"
android:paddingBottom="8dp"
android:visibility="invisible"
android:elevation="4dp" >

<include
android:id="@+id/qs_detail_header"
layout="@layout/qs_detail_header"
<View
android:id="@+id/qs_detail_top_space"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:background="@android:color/transparent" />

<com.android.systemui.statusbar.AlphaOptimizedImageView
android:id="@+id/qs_detail_header_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0"
android:background="@color/qs_detail_progress_track"
android:src="@drawable/indeterminate_anim"
android:scaleType="fitXY"
/>

<com.android.systemui.qs.NonInterceptingScrollView
<com.android.keyguard.AlphaOptimizedLinearLayout
android:id="@+id/detail_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
android:orientation="vertical"
android:background="@drawable/qs_detail_background">

<include
android:id="@+id/qs_detail_header"
layout="@layout/qs_detail_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>

<FrameLayout
android:id="@android:id/content"
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:id="@+id/qs_detail_header_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.android.systemui.qs.NonInterceptingScrollView>
android:layout_height="wrap_content"
android:alpha="0"
android:background="@color/qs_detail_progress_track"
android:src="@drawable/indeterminate_anim"
android:scaleType="fitXY"
/>

<com.android.systemui.qs.NonInterceptingScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">

<FrameLayout
android:id="@android:id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.android.systemui.qs.NonInterceptingScrollView>

<include layout="@layout/qs_detail_buttons" />
<include layout="@layout/qs_detail_buttons" />
</com.android.keyguard.AlphaOptimizedLinearLayout>

</com.android.systemui.qs.QSDetail>
9 changes: 4 additions & 5 deletions packages/SystemUI/res/layout/qs_detail_buttons.xml
Expand Up @@ -17,17 +17,16 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="8dp"
android:gravity="end">
android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
android:gravity="end"
android:orientation="horizontal">

<TextView
android:id="@android:id/button2"
style="@style/QSBorderlessButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:minHeight="48dp"
android:minWidth="132dp"
android:textAppearance="@style/TextAppearance.QS.DetailButton"
android:focusable="true" />

Expand All @@ -37,7 +36,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:minWidth="88dp"
android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
android:textAppearance="@style/TextAppearance.QS.DetailButton"
android:focusable="true"/>

Expand Down
8 changes: 2 additions & 6 deletions packages/SystemUI/res/layout/qs_detail_header.xml
Expand Up @@ -19,17 +19,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/qs_detail_header_padding"
android:paddingTop="@dimen/qs_detail_header_padding"
android:paddingTop="@dimen/qs_detail_items_padding_top"
android:paddingBottom="@dimen/qs_detail_items_padding_top"
android:paddingEnd="@dimen/qs_panel_padding"
android:background="@drawable/btn_borderless_rect"
android:background="@drawable/qs_detail_toolbar"
android:orientation="vertical"
android:gravity="center">

<com.android.systemui.ResizingSpace
android:layout_width="match_parent"
android:layout_height="@dimen/qs_detail_margin_top" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 79ad993

Please sign in to comment.