Loading src/com/android/settings/accessibility/AccessibilityServiceWarning.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.settings.accessibility; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.accessibilityservice.AccessibilityServiceInfo; import android.app.Activity; Loading Loading @@ -72,7 +72,7 @@ public class AccessibilityServiceWarning { Window window = ad.getWindow(); WindowManager.LayoutParams params = window.getAttributes(); params.privateFlags |= PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; params.privateFlags |= SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; window.setAttributes(params); ad.create(); ad.getButton(AlertDialog.BUTTON_POSITIVE).setOnTouchListener(filterTouchListener); Loading src/com/android/settings/applications/appinfo/DrawOverlayDetails.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ */ package com.android.settings.applications.appinfo; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.app.AppOpsManager; import android.content.Context; Loading Loading @@ -83,7 +83,7 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc @Override public void onResume() { super.onResume(); getActivity().getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); getActivity().getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } @Override Loading @@ -91,7 +91,7 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc super.onPause(); Window window = getActivity().getWindow(); WindowManager.LayoutParams attrs = window.getAttributes(); attrs.privateFlags &= ~PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; attrs.privateFlags &= ~SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; window.setAttributes(attrs); } Loading src/com/android/settings/notification/NotificationAccessConfirmationActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -87,13 +87,13 @@ public class NotificationAccessConfirmationActivity extends Activity public void onResume() { super.onResume(); getWindow().addFlags( WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } @Override public void onPause() { getWindow().clearFlags( WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); super.onPause(); } Loading tests/robotests/src/com/android/settings/applications/appinfo/DrawOverlayDetailsTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.settings.applications.appinfo; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.eq; Loading Loading @@ -91,7 +91,7 @@ public class DrawOverlayDetailsTest { when(mWindow.getAttributes()).thenReturn(layoutParams); mFragment.onResume(); verify(mWindow).addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); verify(mWindow).addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); mFragment.onPause(); Loading @@ -99,6 +99,6 @@ public class DrawOverlayDetailsTest { ArgumentCaptor<LayoutParams> paramCaptor = ArgumentCaptor.forClass(LayoutParams.class); verify(mWindow).setAttributes(paramCaptor.capture()); assertEquals(0, paramCaptor.getValue().privateFlags & PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); paramCaptor.getValue().privateFlags & SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } } Loading
src/com/android/settings/accessibility/AccessibilityServiceWarning.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.settings.accessibility; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.accessibilityservice.AccessibilityServiceInfo; import android.app.Activity; Loading Loading @@ -72,7 +72,7 @@ public class AccessibilityServiceWarning { Window window = ad.getWindow(); WindowManager.LayoutParams params = window.getAttributes(); params.privateFlags |= PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; params.privateFlags |= SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; window.setAttributes(params); ad.create(); ad.getButton(AlertDialog.BUTTON_POSITIVE).setOnTouchListener(filterTouchListener); Loading
src/com/android/settings/applications/appinfo/DrawOverlayDetails.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ */ package com.android.settings.applications.appinfo; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.app.AppOpsManager; import android.content.Context; Loading Loading @@ -83,7 +83,7 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc @Override public void onResume() { super.onResume(); getActivity().getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); getActivity().getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } @Override Loading @@ -91,7 +91,7 @@ public class DrawOverlayDetails extends AppInfoWithHeader implements OnPreferenc super.onPause(); Window window = getActivity().getWindow(); WindowManager.LayoutParams attrs = window.getAttributes(); attrs.privateFlags &= ~PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; attrs.privateFlags &= ~SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; window.setAttributes(attrs); } Loading
src/com/android/settings/notification/NotificationAccessConfirmationActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -87,13 +87,13 @@ public class NotificationAccessConfirmationActivity extends Activity public void onResume() { super.onResume(); getWindow().addFlags( WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } @Override public void onPause() { getWindow().clearFlags( WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); super.onPause(); } Loading
tests/robotests/src/com/android/settings/applications/appinfo/DrawOverlayDetailsTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.settings.applications.appinfo; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.eq; Loading Loading @@ -91,7 +91,7 @@ public class DrawOverlayDetailsTest { when(mWindow.getAttributes()).thenReturn(layoutParams); mFragment.onResume(); verify(mWindow).addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); verify(mWindow).addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); mFragment.onPause(); Loading @@ -99,6 +99,6 @@ public class DrawOverlayDetailsTest { ArgumentCaptor<LayoutParams> paramCaptor = ArgumentCaptor.forClass(LayoutParams.class); verify(mWindow).setAttributes(paramCaptor.capture()); assertEquals(0, paramCaptor.getValue().privateFlags & PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); paramCaptor.getValue().privateFlags & SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); } }