Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23d7064d authored by Michael W's avatar Michael W
Browse files

DeskClock: Material Me? No YOU!

* Since Android 12 introduced a new style, try to mimic it for this app
* Due to AndroidX and the support libraries still being old, we have to,
  like Settings does with SettingsLib, create our own styles in the
  desired looks
* Also adjust the color scheme to reflect Material You
* We deviated from AOSP already quite a bit, so we don't need to really
  care about the change's footprint
* Clean up behind us by removing (now unused) resources and includes in
  files that were modified anyways (and adjust order while on it)
* Copy CollapsibleToolbarBaseActivity and required resources from
  SettingsLib - that way we can mimic the style easily without having
  to move this app to system_ext or using privileged_api
  * Since we always use dark layout, modify slightly so it works for us
  * Remove things we don't need so we don't have to copy too many files
    from SettingsLib

Change-Id: I4c81e03c71f468a9e468426a8233ad96059cb05d
parent a997c68c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ android_app {
        "androidx.appcompat_appcompat",
        "androidx.gridlayout_gridlayout",
        "androidx.recyclerview_recyclerview",
        "androidx-constraintlayout_constraintlayout"
    ],
    required: [
        "com.android.deskclock_whitelist"
+2 −3
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    <original-package android:name="com.android.alarmclock" />
    <original-package android:name="com.android.deskclock" />

    <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="29" />
    <uses-sdk android:minSdkVersion="27" android:targetSdkVersion="30" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
@@ -78,8 +78,7 @@
        <activity
            android:name=".ringtone.RingtonePickerActivity"
            android:excludeFromRecents="true"
            android:taskAffinity=""
            android:theme="@style/Theme.DeskClock.RingtonePicker" />
            android:taskAffinity="" />

        <activity
            android:name=".worldclock.CitySelectionActivity"
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     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.
-->
<objectAnimator
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:interpolator="@android:interpolator/fast_out_slow_in"
    android:pathData="M 12.0,15.0 c 0.0,-1.0 0.0,-5.33333 0.0,-6.0"
    android:propertyXName="translateX"
    android:propertyYName="translateY" />
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     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.
-->
<objectAnimator
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:interpolator="@anim/caret_toclose_animation_interpolator_0"
    android:propertyName="rotation"
    android:valueFrom="45.0"
    android:valueTo="-45.0"
    android:valueType="floatType" />
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     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.
-->
<objectAnimator
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:interpolator="@anim/caret_toclose_animation_interpolator_0"
    android:propertyName="rotation"
    android:valueFrom="-45.0"
    android:valueTo="45.0"
    android:valueType="floatType" />
Loading