Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master"
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings.notification;
|
package com.android.settings.notification;
|
||||||
|
|
||||||
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||||
|
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationChannelGroup;
|
import android.app.NotificationChannelGroup;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -28,6 +30,8 @@ import androidx.preference.PreferenceGroup;
|
|||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||||
import com.android.internal.widget.LockPatternUtils;
|
import com.android.internal.widget.LockPatternUtils;
|
||||||
@@ -81,6 +85,9 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
getActivity().getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||||
|
android.util.EventLog.writeEvent(0x534e4554, "119115683", -1, "");
|
||||||
|
|
||||||
if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null) {
|
if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null) {
|
||||||
Log.w(TAG, "Missing package or uid or packageinfo");
|
Log.w(TAG, "Missing package or uid or packageinfo");
|
||||||
finish();
|
finish();
|
||||||
@@ -114,6 +121,15 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
|||||||
updatePreferenceStates();
|
updatePreferenceStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
final Window window = getActivity().getWindow();
|
||||||
|
final WindowManager.LayoutParams attrs = window.getAttributes();
|
||||||
|
attrs.privateFlags &= ~PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||||
|
window.setAttributes(attrs);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getLogTag() {
|
protected String getLogTag() {
|
||||||
return TAG;
|
return TAG;
|
||||||
|
@@ -115,9 +115,13 @@ public class ScreenPinningSettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isScreenLockUsed() {
|
private boolean isScreenLockUsed() {
|
||||||
int def = getCurrentSecurityTitle() != R.string.screen_pinning_unlock_none ? 1 : 0;
|
// This functionality should be kept consistent with
|
||||||
return Settings.Secure.getInt(getContentResolver(),
|
// com.android.server.wm.LockTaskController (see b/127605586)
|
||||||
Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, def) != 0;
|
int defaultValueIfSettingNull = mLockPatternUtils.isSecure(UserHandle.myUserId()) ? 1 : 0;
|
||||||
|
return Settings.Secure.getInt(
|
||||||
|
getContentResolver(),
|
||||||
|
Settings.Secure.LOCK_TO_APP_EXIT_LOCKED,
|
||||||
|
defaultValueIfSettingNull) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean setScreenLockUsed(boolean isEnabled) {
|
private boolean setScreenLockUsed(boolean isEnabled) {
|
||||||
|
Reference in New Issue
Block a user