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

Commit 1bdb0b9a authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Prevents QS Header info clicks when it's hidden

Because the QS Header info views are not set to GONE but just alpha 0,
they could still be clicked when they were not visible. Makes sure that
the clicks are only passed when the views are visible to the user
(VISIBLE and all its parents VISIBLE and alpha>0).

Test: manual, tapping when collapsed and expanded
Fixes: 131408961
Change-Id: Icfb4cd8aca60710372bdff78dd9fb894bd6618d0
parent fad62e74
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public class QSCarrierGroup extends LinearLayout implements

    @Override
    public void onClick(View v) {
        if (!v.isVisibleToUser()) return;
        mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                Settings.ACTION_WIRELESS_SETTINGS), 0);
    }
+2 −2
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements
        if (v == mClockView) {
            mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                    AlarmClock.ACTION_SHOW_ALARMS), 0);
        } else if (v == mNextAlarmContainer) {
        } else if (v == mNextAlarmContainer && mNextAlarmContainer.isVisibleToUser()) {
            if (mNextAlarm.getShowIntent() != null) {
                mActivityStarter.postStartActivityDismissingKeyguard(
                        mNextAlarm.getShowIntent());
@@ -545,7 +545,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements
                        new Intent(Intent.ACTION_REVIEW_ONGOING_PERMISSION_USAGE), 0);
                mHost.collapsePanels();
            });
        } else if (v == mRingerContainer) {
        } else if (v == mRingerContainer && mRingerContainer.isVisibleToUser()) {
            mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                    Settings.ACTION_SOUND_SETTINGS), 0);
        }