Merge "Fix privacy indicators in QQS with new headers" into tm-qpr-dev am: 6b3114884e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20154183 Change-Id: Iffd92dbe499af3a9537c53bcf555d7b51a6a0ebb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import android.graphics.Rect;
|
|||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.view.DisplayCutout;
|
import android.view.DisplayCutout;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
@@ -231,6 +232,16 @@ public class QuickStatusBarHeader extends FrameLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
// If using combined headers, only react to touches inside QuickQSPanel
|
||||||
|
if (!mUseCombinedQSHeader || event.getY() > mHeaderQsPanel.getTop()) {
|
||||||
|
return super.onTouchEvent(event);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void updateResources() {
|
void updateResources() {
|
||||||
Resources resources = mContext.getResources();
|
Resources resources = mContext.getResources();
|
||||||
boolean largeScreenHeaderActive =
|
boolean largeScreenHeaderActive =
|
||||||
|
|||||||
@@ -280,6 +280,9 @@ class LargeScreenShadeHeaderController @Inject constructor(
|
|||||||
context.getString(com.android.internal.R.string.status_bar_alarm_clock)
|
context.getString(com.android.internal.R.string.status_bar_alarm_clock)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (combinedHeaders) {
|
||||||
|
privacyIconsController.onParentVisible()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewAttached() {
|
override fun onViewAttached() {
|
||||||
|
|||||||
@@ -645,6 +645,20 @@ class LargeScreenShadeHeaderControllerCombinedTest : SysuiTestCase() {
|
|||||||
verify(animator).start()
|
verify(animator).start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun privacyChipParentVisibleFromStart() {
|
||||||
|
verify(privacyIconsController).onParentVisible()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun privacyChipParentVisibleAlways() {
|
||||||
|
controller.largeScreenActive = true
|
||||||
|
controller.largeScreenActive = false
|
||||||
|
controller.largeScreenActive = true
|
||||||
|
|
||||||
|
verify(privacyIconsController, never()).onParentInvisible()
|
||||||
|
}
|
||||||
|
|
||||||
private fun createWindowInsets(
|
private fun createWindowInsets(
|
||||||
topCutout: Rect? = Rect()
|
topCutout: Rect? = Rect()
|
||||||
): WindowInsets {
|
): WindowInsets {
|
||||||
|
|||||||
Reference in New Issue
Block a user