Enable the filterTouchesWhenObscured in Special app access
- Enable the filterTouchesWhenObscured attribute on all toggle switches in all pages of the special app access Fixes: 155288585 Test: make RunSettingsRoboTests Change-Id: I011cfe4b7e4e624a8338332ac47a353f7f3ab661
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
package com.android.settings.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -28,4 +30,13 @@ public class AppSwitchPreference extends SwitchPreference {
|
||||
super(context);
|
||||
setLayoutResource(R.layout.preference_app);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
final View switchView = holder.findViewById(android.R.id.switch_widget);
|
||||
if (switchView != null) {
|
||||
switchView.setFilterTouchesWhenObscured(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user