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

Commit 5f11bf60 authored by Nick Chameyev's avatar Nick Chameyev
Browse files

Do not use shared lib resources

Temporary removes usages of SysUI shared
resources as it leads to crashes in Launcher
tests.

Bug: 204727471
Test: install launcher, try autorotate suggestion
Change-Id: I1e3c1f5b331a22a753acc3fe0ee544d50fba5c18
parent 0288d2e8
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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
  -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <com.android.systemui.shared.rotation.FloatingRotationButtonView
        android:id="@+id/rotate_suggestion"
        android:layout_width="@dimen/floating_rotation_button_diameter"
        android:layout_height="@dimen/floating_rotation_button_diameter"
        android:paddingStart="@dimen/navigation_key_padding"
        android:paddingEnd="@dimen/navigation_key_padding"
        android:layout_gravity="bottom|left"
        android:scaleType="center"
        android:visibility="invisible" />
</FrameLayout>
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
 * Copyright (c) 2021, 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>
    <dimen name="navigation_key_padding">25dp</dimen>
</resources>
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
 * Copyright (c) 2021, 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 maximum width of the navigation bar ripples. -->
    <dimen name="key_button_ripple_max_width">76dp</dimen>

    <!-- The padding around the navigation buttons -->
    <dimen name="navigation_key_padding">0dp</dimen>
</resources>
 No newline at end of file
+13 −0
Original line number Diff line number Diff line
@@ -197,6 +197,19 @@
    <!-- Minimum distance to swipe to trigger accessibility gesture -->
    <dimen name="accessibility_gesture_min_swipe_distance">80dp</dimen>

    <!-- The maximum width of the navigation bar ripples. -->
    <dimen name="key_button_ripple_max_width">95dp</dimen>

    <dimen name="rounded_corner_content_padding">0dp</dimen>

    <dimen name="navigation_key_padding">0dp</dimen>

    <!-- Floating rotation button -->
    <dimen name="floating_rotation_button_diameter">40dp</dimen>
    <dimen name="floating_rotation_button_min_margin">20dp</dimen>
    <dimen name="floating_rotation_button_taskbar_left_margin">20dp</dimen>
    <dimen name="floating_rotation_button_taskbar_bottom_margin">10dp</dimen>

    <!-- Taskbar -->
    <dimen name="taskbar_size">@*android:dimen/taskbar_frame_height</dimen>
    <dimen name="taskbar_icon_touch_size">48dp</dimen>
+9 −1
Original line number Diff line number Diff line
@@ -210,7 +210,15 @@ public class NavbarButtonsViewController {
            mControllers.rotationButtonController.setRotationButton(rotationButton, null);
        } else {
            mFloatingRotationButton = new FloatingRotationButton(mContext,
                    R.string.accessibility_rotate_button);
                    R.string.accessibility_rotate_button,
                    R.layout.rotate_suggestion,
                    R.id.rotate_suggestion,
                    R.dimen.floating_rotation_button_min_margin,
                    R.dimen.rounded_corner_content_padding,
                    R.dimen.floating_rotation_button_taskbar_left_margin,
                    R.dimen.floating_rotation_button_taskbar_bottom_margin,
                    R.dimen.floating_rotation_button_diameter,
                    R.dimen.key_button_ripple_max_width);
            mControllers.rotationButtonController.setRotationButton(mFloatingRotationButton,
                    mRotationButtonListener);