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

Commit 36a673a7 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'dungeon' into oc-dev

* changes:
  Hide redundant foreground service notifications.
  Updates to Dianne's Dungeon.
parents 1d1cf130 008cea77
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ public class SystemNotificationChannels {
        channelsList.add(new NotificationChannel(
        channelsList.add(new NotificationChannel(
                FOREGROUND_SERVICE,
                FOREGROUND_SERVICE,
                context.getString(R.string.notification_channel_foreground_service),
                context.getString(R.string.notification_channel_foreground_service),
                NotificationManager.IMPORTANCE_MIN));
                NotificationManager.IMPORTANCE_LOW));


        nm.createNotificationChannels(channelsList);
        nm.createNotificationChannels(channelsList);
    }
    }
+29 −0
Original line number Original line Diff line number Diff line
<!--
Copyright (C) 2017 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!-- "system vitals", as represented by an EKG trace -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FF000000"
        android:pathData="M19.5608645,12.0797103 L17.15,5.15 L15.25,5.15 L11.95,15.95 L9.75,11.5 L7.95,11.55 L7.2,13.3
        L6.65,14.6 L3.25,14.6 L3.25,16.6 L7.35,16.6 L8,16.6 L8.25,16 L8.9,14.3 L11.2,18.85 L13.15,18.85 L16.25,8.8
        L17.5310733,12.642689 C17.2014325,12.9992627 17,13.4761078 17,14 C17,15.1045695 17.8954305,16 19,16
        C20.1045695,16 21,15.1045695 21,14 C21,13.0901368 20.3924276,12.3221796 19.5608645,12.0797103 Z M21,3
        C22,3 23,4 23,5 L23,19 C23,20 22,21 21,21 L3,21 C1.9,21 1,20.1 1,19 L1,5 C1,4 2,3 3,3 L21,3 Z" />
</vector>
+1 −0
Original line number Original line Diff line number Diff line
@@ -3024,4 +3024,5 @@
  <java-symbol type="bool" name="config_handleVolumeKeysInWindowManager" />
  <java-symbol type="bool" name="config_handleVolumeKeysInWindowManager" />


  <java-symbol type="integer" name="config_inCallNotificationVolumeRelative" />
  <java-symbol type="integer" name="config_inCallNotificationVolumeRelative" />
  <java-symbol type="drawable" name="stat_sys_vitals" />
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -264,6 +264,9 @@ public class Dependency extends SystemUI {
        mProviders.put(AccessibilityManagerWrapper.class,
        mProviders.put(AccessibilityManagerWrapper.class,
                () -> new AccessibilityManagerWrapper(mContext));
                () -> new AccessibilityManagerWrapper(mContext));


        mProviders.put(ForegroundServiceController.class,
                () -> new ForegroundServiceControllerImpl(mContext));

        mProviders.put(UiOffloadThread.class, UiOffloadThread::new);
        mProviders.put(UiOffloadThread.class, UiOffloadThread::new);


        // Put all dependencies above here so the factory can override them if it wants.
        // Put all dependencies above here so the factory can override them if it wants.
+49 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.android.systemui;

import android.service.notification.StatusBarNotification;

public interface ForegroundServiceController {
    /**
     * @param sbn notification that was just posted
     * @param importance
     */
    void addNotification(StatusBarNotification sbn, int importance);

    /**
     * @param sbn notification that was just changed in some way
     * @param newImportance
     */
    void updateNotification(StatusBarNotification sbn, int newImportance);

    /**
     * @param sbn notification that was just canceled
     */
    boolean removeNotification(StatusBarNotification sbn);

    /**
     * @param userId
     * @return true if this user has services missing notifications and therefore needs a
     * disclosure notification.
     */
    boolean isDungeonNeededForUser(int userId);

    /**
     * @param sbn
     * @return true if sbn is the system-provided "dungeon" (list of running foreground services).
     */
    boolean isDungeonNotification(StatusBarNotification sbn);
}
Loading