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

Commit 9eae838a authored by Selim Cinek's avatar Selim Cinek
Browse files

resolve merge conflicts of 383cc530 to master

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I52ee72a7e09792c604eb7cb4a76a6657f808e720
parents 842a51d8 383cc530
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -191,21 +191,15 @@

    <!-- Notification title to tell the user that data service is blocked by access control. -->
    <string name="RestrictedOnDataTitle">No data service</string>
    <!-- Notification title to tell the user that emergency service is blocked by access control. -->
    <string name="RestrictedOnEmergencyTitle">No emergency service</string>
    <!-- Notification title to tell the user that emergency calling is blocked by access control. -->
    <string name="RestrictedOnEmergencyTitle">No emergency calling</string>
    <!-- Notification title to tell the user that normal service is blocked by access control. -->
    <string name="RestrictedOnNormalTitle">No voice service</string>
    <!-- Notification title to tell the user that all emergency and normal voice services are blocked by access control. -->
    <string name="RestrictedOnAllVoiceTitle">No voice/emergency service</string>

    <!-- Notification content to tell the user that data service is blocked by access control. -->
    <string name="RestrictedOnDataContent">Your carrier has temporarily suspended data service at this location</string>
    <!-- Notification content to tell the user that emergency service is blocked by access control. -->
    <string name="RestrictedOnEmergencyContent">Your carrier has temporarily suspended emergency calls at this location</string>
    <!-- Notification content to tell the user that normal service is blocked by access control. -->
    <string name="RestrictedOnNormalContent">Your carrier has temporarily suspended voice calls at this location</string>
    <!-- Notification content to tell the user that all emergency and normal voice services are blocked by access control. -->
    <string name="RestrictedOnAllVoiceContent">Your carrier has temporarily suspended voice and emergency calls at this location</string>
    <!-- Notification content to tell the user that voice/data/emergency service is blocked by access control. -->
    <string name="RestrictedStateContent">Temporarily not offered by the mobile network at your location</string>

    <!-- Displayed to tell the user that they should switch their network preference. -->
    <string name="NetworkPreferenceSwitchTitle">Can\u2019t reach network</string>
+1 −4
Original line number Diff line number Diff line
@@ -529,10 +529,7 @@
  <java-symbol type="string" name="RestrictedOnDataTitle" />
  <java-symbol type="string" name="RestrictedOnEmergencyTitle" />
  <java-symbol type="string" name="RestrictedOnNormalTitle" />
  <java-symbol type="string" name="RestrictedOnAllVoiceContent" />
  <java-symbol type="string" name="RestrictedOnDataContent" />
  <java-symbol type="string" name="RestrictedOnEmergencyContent" />
  <java-symbol type="string" name="RestrictedOnNormalContent" />
  <java-symbol type="string" name="RestrictedStateContent" />
  <java-symbol type="string" name="notification_channel_network_alert" />
  <java-symbol type="string" name="notification_channel_call_forward" />
  <java-symbol type="string" name="notification_channel_emergency_callback" />
+26 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ import com.android.systemui.plugins.PluginManager;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.MenuItem;
import com.android.systemui.statusbar.NotificationGuts.GutsContent;
import com.android.systemui.statusbar.notification.AboveShelfChangedListener;
import com.android.systemui.statusbar.notification.AboveShelfObserver;
import com.android.systemui.statusbar.notification.HybridNotificationView;
import com.android.systemui.statusbar.notification.NotificationInflater;
import com.android.systemui.statusbar.notification.NotificationUtils;
@@ -162,6 +164,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    private boolean mIsSystemChildExpanded;
    private boolean mIsPinned;
    private FalsingManager mFalsingManager;
    private AboveShelfChangedListener mAboveShelfChangedListener;
    private HeadsUpManager mHeadsUpManager;

    private boolean mJustClicked;
@@ -388,6 +391,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        expandedIcon.setStaticDrawableColor(color);
    }

    public void setAboveShelfChangedListener(AboveShelfChangedListener aboveShelfChangedListener) {
        mAboveShelfChangedListener = aboveShelfChangedListener;
    }

    @Override
    public boolean isDimmable() {
        if (!getShowingLayout().isDimmable()) {
@@ -442,6 +449,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    public void setHeadsUp(boolean isHeadsUp) {
        boolean wasAboveShelf = isAboveShelf();
        int intrinsicBefore = getIntrinsicHeight();
        mIsHeadsUp = isHeadsUp;
        mPrivateLayout.setHeadsUp(isHeadsUp);
@@ -454,6 +462,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        }
        if (isHeadsUp) {
            setAboveShelf(true);
        } else if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
    }

@@ -634,6 +644,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
     */
    public void setPinned(boolean pinned) {
        int intrinsicHeight = getIntrinsicHeight();
        boolean wasAboveShelf = isAboveShelf();
        mIsPinned = pinned;
        if (intrinsicHeight != getIntrinsicHeight()) {
            notifyHeightChanged(false /* needsAnimation */);
@@ -645,6 +656,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            setUserExpanded(true);
        }
        setChronometerRunning(mLastChronometerRunning);
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
    }

    public boolean isPinned() {
@@ -993,8 +1007,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    public void setHeadsUpAnimatingAway(boolean headsUpAnimatingAway) {
        boolean wasAboveShelf = isAboveShelf();
        mHeadsupDisappearRunning = headsUpAnimatingAway;
        mPrivateLayout.setHeadsUpAnimatingAway(headsUpAnimatingAway);
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
    }

    /**
@@ -1555,6 +1573,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
     */
    public void setOnKeyguard(boolean onKeyguard) {
        if (onKeyguard != mOnKeyguard) {
            boolean wasAboveShelf = isAboveShelf();
            final boolean wasExpanded = isExpanded();
            mOnKeyguard = onKeyguard;
            onExpansionChanged(false /* userAction */, wasExpanded);
@@ -1564,6 +1583,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                }
                notifyHeightChanged(false /* needsAnimation */);
            }
            if (isAboveShelf() != wasAboveShelf) {
                mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
            }
        }
    }

@@ -2214,7 +2236,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    public void setAboveShelf(boolean aboveShelf) {
        boolean wasAboveShelf = isAboveShelf();
        mAboveShelf = aboveShelf;
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
    }

    public static class NotificationViewState extends ExpandableViewState {
+7 −5
Original line number Diff line number Diff line
@@ -146,12 +146,12 @@ public class NotificationData {

            // Construct the icon.
            icon = new StatusBarIconView(context,
                    sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), n);
                    sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), sbn);
            icon.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

            // Construct the expanded icon.
            expandedIcon = new StatusBarIconView(context,
                    sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), n);
                    sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()), sbn);
            expandedIcon.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
            final StatusBarIcon ic = new StatusBarIcon(
                    sbn.getUser(),
@@ -187,9 +187,11 @@ public class NotificationData {
         * @param n the notification to read the icon from.
         * @throws InflationException
         */
        public void updateIcons(Context context, Notification n) throws InflationException {
        public void updateIcons(Context context, StatusBarNotification sbn)
                throws InflationException {
            if (icon != null) {
                // Update the icon
                Notification n = sbn.getNotification();
                final StatusBarIcon ic = new StatusBarIcon(
                        notification.getUser(),
                        notification.getPackageName(),
@@ -197,8 +199,8 @@ public class NotificationData {
                        n.iconLevel,
                        n.number,
                        StatusBarIconView.contentDescForNotification(context, n));
                icon.setNotification(n);
                expandedIcon.setNotification(n);
                icon.setNotification(sbn);
                expandedIcon.setNotification(sbn);
                if (!icon.set(ic) || !expandedIcon.set(ic)) {
                    throw new InflationException("Couldn't update icon: " + ic);
                }
+2 −1
Original line number Diff line number Diff line
@@ -179,7 +179,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
                mShelfState.notGoneIndex = Math.min(mShelfState.notGoneIndex, mNotGoneIndex);
            }
            mShelfState.hasItemsInStableShelf = lastViewState.inShelf;
            mShelfState.hidden = !mAmbientState.isShadeExpanded();
            mShelfState.hidden = !mAmbientState.isShadeExpanded()
                    || mAmbientState.isQsCustomizerShowing();
            mShelfState.maxShelfEnd = maxShelfEnd;
        } else {
            mShelfState.hidden = true;
Loading