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

Commit 186ff169 authored by Hyunki Kim's avatar Hyunki Kim Committed by Tyler Freeman
Browse files

feat(magnify): add window magnification settings panel UI

Using option panel, user can change window magnification options(change size, scale, allow diagonal scrolling)
When turn on change size, user can change window magnification size by dragging the edge of the window or 3 type size.
and turn on allow diagonal scrolling feature, user can move the window diagonally
and can change scale

Feature cherry-picked from https://partner-android-review.googlesource.com/c/platform/frameworks/base/+/2235963

Test: unit and manual

Bug: b/188136191

Change-Id: I4f045c5c334ba4c99c893bdbc44f2c1f62cd9067
parent ad5f5557
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -7811,6 +7811,16 @@ public final class Settings {
        public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE =
                "accessibility_display_magnification_auto_update";
        /**
         * Accessibility Window Magnification Allow diagonal scrolling value. The value is boolean.
         * 1 : on, 0 : off
         *
         * @hide
         */
        public static final String ACCESSIBILITY_ALLOW_DIAGONAL_SCROLLING =
                "accessibility_allow_diagonal_scrolling";
        /**
         * Setting that specifies what mode the soft keyboard is in (default or hidden). Can be
         * modified from an AccessibilityService using the SoftKeyboardController.
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (C) 2022 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>
        <shape android:shape="rectangle">
            <solid android:color="@color/accessibility_magnifier_bg" />
            <corners android:radius="24dp" />
            <stroke
                android:color="@color/accessibility_magnifier_bg_stroke"
                android:width="1dp" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2022 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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
    <shape android:shape="oval">
        <solid android:color="@color/accessibility_magnifier_bg" />
        <size
            android:width="56dp"
            android:height="56dp"/>
        <corners android:radius="2dp"/>
    </shape>
</item>
</ripple>
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2022 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="@color/accessibility_magnifier_bg" />
    <size
        android:width="56dp"
        android:height="56dp"/>
    <corners android:radius="2dp"/>
    <stroke
        android:color="@color/accessibility_magnifier_bg_stroke"
        android:width="1dp" />
 </shape>
 No newline at end of file
+29 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2022 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="32dp"
    android:height="32dp"
    android:viewportWidth="32"
    android:viewportHeight="32">
  <path
      android:pathData="M7.3334,24.6667L24.6674,7.3334M7.3334,7.3334L24.6674,24.6667"
      android:strokeLineJoin="round"
      android:strokeWidth="1.5"
      android:fillColor="#00000000"
      android:strokeColor="#000000"
      android:fillType="evenOdd"
      android:strokeLineCap="round"/>
</vector>
Loading