-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Convert `SIM PIN` preference to a FAB button * Add the `Add` FAB button * Drop `Reset` scheduler option * Bring in alarm card layout from `DeskClock` app for schedule items * fix(ToolbarDecorator): detect layout direction & set relative padding during measurements In the previous implementation we attempted to detect layout direction & set relative padding during construction, which may not always be ready (e.g., in split-screen), resulting in "LTR" padding whereas it's actually "RTL". * Update and remove unused translations * Import translations * Fix handling `single-schedule`s 1. When AlarmReceiver triggers the sync of all SIM subscriptions with their weekly repeat schedules, it overrides user's preference, i.e when the SIM card is expected to be disabled/enabled, but the user enabled/disabled it manually, so we want to keep the state within the allowed period. Currently, this breaks so-called "single-schedule"s, i.e., a schedule that doesn't have an opposite schedule that could invert the action. Fortunately, in the context of AlarmReceiver, we actually don't need to force override user's preference at all, because the alarm will always fire in the future, and at some point the Last{Act/Deact}-ivatedTime fields of the SIM card that we're checking to determine the expected state, will be behind the nearest schedule at the moment of synchronization. 2. When schedules of a particular SIM subscription are explicitly mutated by the user, we trigger the sync of all SIM subscriptions with their weekly repeat schedules. Again, we must override user's preference in order for the changes to take effect, but we need to do this only for the affected SIM subscription, which makes sense logically. p.s. The previous approach was literally a "left-over" from the "alpha" release and was already an overkill even before the "single-schedule" support was added, so it's also a tweak. * Update README & images
- Loading branch information
Showing
131 changed files
with
5,774 additions
and
1,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="12" /> | ||
</selector> |
7 changes: 7 additions & 0 deletions
7
res/color-night-v31/schedule_card_collapsed_background_color.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="22" | ||
android:alpha="0.86" /> | ||
</selector> |
6 changes: 6 additions & 0 deletions
6
res/color-night-v31/schedule_card_expanded_background_color.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="17" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_enabled="false" | ||
android:color="@android:color/system_accent1_100" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
<item android:color="@android:color/system_accent1_100"/> | ||
</selector> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_enabled="false" | ||
android:color="@android:color/black" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
<item android:color="@android:color/black"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_enabled="false" | ||
android:color="@android:color/system_accent2_100" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
<item android:color="@android:color/system_accent2_100"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="24" | ||
android:alpha="0.12" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="92" | ||
android:alpha="0.86" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral2_600" | ||
android:lStar="22" | ||
android:alpha="0.22" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:color="@android:color/system_neutral1_600" | ||
android:lStar="87" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_enabled="false" | ||
android:color="@android:color/system_accent1_900" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
<item android:color="@android:color/system_accent1_900"/> | ||
</selector> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_checked="true" | ||
android:color="@color/schedule_card_day_selected_text_color" /> | ||
|
||
<item android:color="?android:textColorPrimary" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="?android:attr/colorAccent"/> | ||
</selector> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_enabled="false" | ||
android:color="@android:color/white" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
<item android:color="@android:color/white"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_checked="true" | ||
android:color="@color/fab_pin_set_background_tint_color" /> | ||
<item android:color="@color/fab_pin_unset_background_tint_color" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_checked="true" | ||
android:state_enabled="true" | ||
android:color="@color/fab_pin_set_tint_color" /> | ||
<item android:state_enabled="true" | ||
android:color="@color/fab_pin_unset_tint_color" /> | ||
|
||
<item android:state_enabled="false" | ||
android:state_checked="false" | ||
android:color="@color/fab_pin_unset_tint_color" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
|
||
<item android:state_enabled="false" | ||
android:state_checked="true" | ||
android:color="@color/fab_pin_set_tint_color" | ||
android:alpha="?android:attr/disabledAlpha" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:top="8dp" | ||
android:left="8dp" | ||
android:right="8dp" | ||
android:bottom="8dp"> | ||
|
||
<ripple | ||
android:color="?android:attr/colorControlHighlight" | ||
android:radius="16dp"> | ||
|
||
<item android:id="@android:id/mask"> | ||
<shape> | ||
<solid android:color="@android:color/white" /> | ||
</shape> | ||
</item> | ||
|
||
<item> | ||
<selector | ||
android:enterFadeDuration="450" | ||
android:exitFadeDuration="375"> <!-- Enter/exit fade duration taken from the ripple effect component --> | ||
|
||
<item android:state_checked="true"> | ||
<shape android:shape="oval"> | ||
<size android:height="20dp" android:width="20dp" /> | ||
<solid android:color="@color/schedule_card_day_selected_background_color" /> | ||
</shape> | ||
</item> | ||
|
||
<item> | ||
<shape android:shape="oval"> | ||
<size android:height="20dp" android:width="20dp" /> | ||
<stroke android:width="1dp" android:color="@color/schedule_card_day_unselected_stroke_color" /> | ||
</shape> | ||
</item> | ||
</selector> | ||
</item> | ||
</ripple> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright 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 | ||
https://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="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="#FFFFFFFF" | ||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright (C) 2023 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. | ||
--> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:top="8dp" | ||
android:left="8dp" | ||
android:right="8dp" | ||
android:bottom="8dp"> | ||
<shape android:shape="oval"> | ||
<size android:height="24dp" android:width="24dp" /> | ||
<solid android:color="@color/schedule_card_arrow_background_color" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<vector | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="48.0" | ||
android:viewportHeight="48.0" | ||
android:tint="?android:textColorPrimary"> | ||
<group | ||
android:translateX="12" | ||
android:translateY="13"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M5.41,7.59L4,9l8,8 8,-8 -1.41,-1.41L12,14.17" /> | ||
</group> | ||
</vector> | ||
</item> | ||
</layer-list> |
Oops, something went wrong.