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

Commit a3868292 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge remote-tracking branch 'origin/lineage-15.1' into v1-oreo

parents f282b678 cfef9ae1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -112,9 +112,11 @@ public class ScreenPinningSettings extends SettingsPreferenceFragment
    }

    private boolean isScreenLockUsed() {
        int def = getCurrentSecurityTitle() != R.string.screen_pinning_unlock_none ? 1 : 0;
        // This functionality should be kept consistent with
        // com.android.server.am.ActivityStackSupervisor (see b/127605586)
        int defaultValueIfSettingNull = mLockPatternUtils.isSecure(UserHandle.myUserId()) ? 1 : 0;
        return Settings.Secure.getInt(getContentResolver(),
                Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, def) != 0;
                Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, defaultValueIfSettingNull) != 0;
    }

    private boolean setScreenLockUsed(boolean isEnabled) {
+16 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package com.android.settings.notification;

import android.app.Activity;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

import android.app.NotificationChannel;
import android.app.NotificationChannelGroup;
import android.app.NotificationManager;
@@ -33,6 +35,8 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Switch;
import android.view.Window;
import android.view.WindowManager;

import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
@@ -76,6 +80,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();
@@ -125,6 +132,15 @@ public class AppNotificationSettings extends NotificationSettingsBase {
        updateDependents(mAppRow.banned);
    }

    @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);
    }

    private void addHeaderPref() {
        ArrayMap<String, AppRow> rows = new ArrayMap<>();
        rows.put(mAppRow.pkg, mAppRow);