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

Commit faca3a08 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Inline unnecessary helper methods

The methods in question just access a private member variable of the class. Inlining them improves code readability.

Flag: EXEMPT trivial method refactor
Test: atest SystemUITests
Change-Id: Idae3e0af5a7b4e2bb178952617514163288ea9b9
parent 0722b663
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -706,7 +706,7 @@ public class HeadsUpManagerImpl
    }

    private void updateHeadsUpFlow() {
        mHeadsUpNotificationRows.setValue(new HashSet<>(getHeadsUpEntryPhoneMap().values()));
        mHeadsUpNotificationRows.setValue(new HashSet<>(mHeadsUpEntryMap.values()));
    }

    @Override
@@ -732,11 +732,6 @@ public class HeadsUpManagerImpl
        return mHeadsUpAnimatingAway.getValue();
    }

    @NonNull
    private ArrayMap<String, HeadsUpEntry> getHeadsUpEntryPhoneMap() {
        return mHeadsUpEntryMap;
    }

    /**
     * Called to notify the listeners that the HUN animating away animation has ended.
     */
@@ -1014,7 +1009,7 @@ public class HeadsUpManagerImpl
    @Override
    public void setRemoteInputActive(
            @NonNull NotificationEntry entry, boolean remoteInputActive) {
        HeadsUpEntry headsUpEntry = getHeadsUpEntryPhone(entry.getKey());
        HeadsUpEntry headsUpEntry = mHeadsUpEntryMap.get(entry.getKey());
        if (headsUpEntry != null && headsUpEntry.mRemoteInputActive != remoteInputActive) {
            headsUpEntry.mRemoteInputActive = remoteInputActive;
            if (ExpandHeadsUpOnInlineReply.isEnabled() && remoteInputActive) {
@@ -1029,11 +1024,6 @@ public class HeadsUpManagerImpl
        }
    }

    @Nullable
    private HeadsUpEntry getHeadsUpEntryPhone(@NonNull String key) {
        return mHeadsUpEntryMap.get(key);
    }

    @Override
    public void setGutsShown(@NonNull NotificationEntry entry, boolean gutsShown) {
        HeadsUpEntry headsUpEntry = getHeadsUpEntry(entry.getKey());
@@ -1125,7 +1115,7 @@ public class HeadsUpManagerImpl
            return true;
        }

        HeadsUpEntry headsUpEntry = getHeadsUpEntryPhone(key);
        HeadsUpEntry headsUpEntry = mHeadsUpEntryMap.get(key);
        HeadsUpEntry topEntry = getTopHeadsUpEntryPhone();

        if (headsUpEntry == null || headsUpEntry != topEntry) {