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

Commit c5d33860 authored by Michal Brzezinski's avatar Michal Brzezinski Committed by Automerger Merge Worker
Browse files

Moving now playing widget above lock icon in split shade am: 109831c3 am: 92305b96

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16183851

Change-Id: Ib77b36b99aca13dcc722fbff29f9d805fcebe52e
parents f05dd233 92305b96
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -33,5 +33,4 @@
    <!-- Notifications are sized to match the width of two (of 4) qs tiles in landscape. -->
    <bool name="config_skinnyNotifsInLandscape">false</bool>

    <dimen name="keyguard_indication_margin_bottom">25dp</dimen>
</resources>
+24 −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>

    <!-- keyguard-->
    <dimen name="keyguard_indication_margin_bottom">25dp</dimen>
    <dimen name="ambient_indication_margin_bottom">115dp</dimen>
    <dimen name="lock_icon_margin_bottom">60dp</dimen>
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -713,7 +713,9 @@
    <dimen name="keyguard_lock_padding">20dp</dimen>

    <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
    <dimen name="lock_icon_margin_bottom">98dp</dimen>
    <dimen name="lock_icon_margin_bottom">110dp</dimen>
    <dimen name="ambient_indication_margin_bottom">71dp</dimen>


    <!-- How much two taps can be apart to still be recognized as a double tap on the lockscreen -->
    <dimen name="double_tap_slop">32dp</dimen>
+9 −9
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;

@@ -85,7 +86,6 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    private static final float sDefaultDensity =
            (float) DisplayMetrics.DENSITY_DEVICE_STABLE / (float) DisplayMetrics.DENSITY_DEFAULT;
    private static final int sLockIconRadiusPx = (int) (sDefaultDensity * 36);
    private static final float sDistAboveKgBottomAreaPx = sDefaultDensity * 12;
    private static final AudioAttributes VIBRATION_SONIFICATION_ATTRIBUTES =
            new AudioAttributes.Builder()
                .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
@@ -126,7 +126,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    private boolean mUdfpsSupported;
    private float mHeightPixels;
    private float mWidthPixels;
    private int mBottomPadding; // in pixels
    private int mBottomPaddingPx;

    private boolean mShowUnlockIcon;
    private boolean mShowLockIcon;
@@ -347,11 +347,11 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    }

    private void updateConfiguration() {
        final DisplayMetrics metrics = mView.getContext().getResources().getDisplayMetrics();
        mWidthPixels = metrics.widthPixels;
        mHeightPixels = metrics.heightPixels;
        mBottomPadding = mView.getContext().getResources().getDimensionPixelSize(
                R.dimen.lock_icon_margin_bottom);
        WindowManager windowManager = getContext().getSystemService(WindowManager.class);
        Rect bounds = windowManager.getCurrentWindowMetrics().getBounds();
        mWidthPixels = bounds.right;
        mHeightPixels = bounds.bottom;
        mBottomPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_margin_bottom);

        mUnlockedLabel = mView.getContext().getResources().getString(
                R.string.accessibility_unlock_button);
@@ -370,8 +370,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
        } else {
            mView.setCenterLocation(
                    new PointF(mWidthPixels / 2,
                        mHeightPixels - mBottomPadding - sDistAboveKgBottomAreaPx
                            - sLockIconRadiusPx), sLockIconRadiusPx);
                        mHeightPixels - mBottomPaddingPx - sLockIconRadiusPx),
                        sLockIconRadiusPx);
        }

        mView.getHitRect(mSensorTouchLocation);
+6 −1
Original line number Diff line number Diff line
@@ -3703,7 +3703,12 @@ public class NotificationPanelViewController extends PanelViewController {
        mNotificationStackScrollLayoutController.setPulsing(pulsing, animatePulse);
    }

    public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) {
    public void setAmbientIndicationTop(int ambientIndicationTop, boolean ambientTextVisible) {
        int ambientIndicationBottomPadding = 0;
        if (ambientTextVisible) {
            int stackBottom = mNotificationStackScrollLayoutController.getView().getBottom();
            ambientIndicationBottomPadding = stackBottom - ambientIndicationTop;
        }
        if (mAmbientIndicationBottomPadding != ambientIndicationBottomPadding) {
            mAmbientIndicationBottomPadding = ambientIndicationBottomPadding;
            updateMaxDisplayedNotifications(true);
Loading