Merge "Remove click listeners from app op icons" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
526dba462f
@@ -17,7 +17,6 @@
|
||||
package android.view;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.AppOpsManager;
|
||||
import android.app.Notification;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.content.Context;
|
||||
@@ -27,7 +26,6 @@ import android.graphics.Canvas;
|
||||
import android.graphics.Outline;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.ArraySet;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -396,6 +394,7 @@ public class NotificationHeaderView extends ViewGroup {
|
||||
addRectAroundView(mIcon);
|
||||
mExpandButtonRect = addRectAroundView(mExpandButton);
|
||||
mAppOpsRect = addRectAroundView(mAppOps);
|
||||
setTouchDelegate(new TouchDelegate(mAppOpsRect, mAppOps));
|
||||
addWidthRect();
|
||||
mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
|
||||
}
|
||||
|
||||
@@ -143,34 +143,35 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:orientation="horizontal" >
|
||||
<ImageButton
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/camera"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_camera"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_camera_active"
|
||||
/>
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/mic"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_mic"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:layout_marginStart="4dp"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_microphone_active"
|
||||
/>
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/overlay"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_alert_window_layer"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:layout_marginStart="4dp"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_overlay_active"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -195,35 +195,36 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingTop="3dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:orientation="horizontal" >
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:layout_marginStart="4dp"
|
||||
android:id="@+id/camera"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_camera"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_camera_active"
|
||||
/>
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/mic"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_mic"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:layout_marginStart="4dp"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_microphone_active"
|
||||
/>
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/overlay"
|
||||
android:layout_width="?attr/notificationHeaderIconSize"
|
||||
android:layout_height="?attr/notificationHeaderIconSize"
|
||||
android:src="@drawable/ic_alert_window_layer"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:layout_marginStart="4dp"
|
||||
android:visibility="gone"
|
||||
android:focusable="false"
|
||||
android:contentDescription="@string/notification_appops_overlay_active"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.android.systemui.statusbar.notification.row.wrapper;
|
||||
|
||||
import static com.android.systemui.statusbar.notification.TransformState.TRANSFORM_Y;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.app.AppOpsManager;
|
||||
import android.app.Notification;
|
||||
import android.content.Context;
|
||||
@@ -133,15 +132,6 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper {
|
||||
if (mAppOps != null) {
|
||||
mAppOps.setOnClickListener(listener);
|
||||
}
|
||||
if (mCameraIcon != null) {
|
||||
mCameraIcon.setOnClickListener(listener);
|
||||
}
|
||||
if (mMicIcon != null) {
|
||||
mMicIcon.setOnClickListener(listener);
|
||||
}
|
||||
if (mOverlayIcon != null) {
|
||||
mOverlayIcon.setOnClickListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user