Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f047cf5c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [7982564, 7982192, 7982565, 7981411, 7982522, 7982682,...

Merge cherrypicks of [7982564, 7982192, 7982565, 7981411, 7982522, 7982682, 7982193, 7982194, 7982523, 7982480, 7982623, 7981412, 7981413, 7982605, 7982606, 7982607, 7982608, 7981749, 7981750, 7981751, 7981752, 7981753, 7981754, 7982624, 7982394, 7982395, 7982625, 7982687, 7982566, 7982567, 7982568, 7982688, 7982689, 7982690, 7982195, 7982196, 7982611, 7982612, 7982396, 7982694, 7982695, 7982215] into pi-qpr3-release

Change-Id: Ic12e6c3afa5653f27b0aae1b8697e72d02813b36
parents 1fb5b510 05b6c460
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

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.NotificationChannelGroup;
import android.content.Context;
@@ -28,6 +30,8 @@ import android.support.v7.preference.PreferenceGroup;
import android.support.v7.preference.PreferenceScreen;
import android.text.TextUtils;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;

import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.widget.LockPatternUtils;
@@ -81,6 +85,9 @@ public class AppNotificationSettings extends NotificationSettingsBase {
    public void 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) {
            Log.w(TAG, "Missing package or uid or packageinfo");
            finish();
@@ -114,6 +121,15 @@ public class AppNotificationSettings extends NotificationSettingsBase {
        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
    protected String getLogTag() {
        return TAG;
+7 −3
Original line number Diff line number Diff line
@@ -115,9 +115,13 @@ public class ScreenPinningSettings extends SettingsPreferenceFragment
    }

    private boolean isScreenLockUsed() {
        int def = getCurrentSecurityTitle() != R.string.screen_pinning_unlock_none ? 1 : 0;
        return Settings.Secure.getInt(getContentResolver(),
                Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, def) != 0;
        // This functionality should be kept consistent with
        // com.android.server.wm.LockTaskController (see b/127605586)
        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) {