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

Commit 2325f276 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Remove dead code #9: Remove ticker code in PhoneStatusBar

Change-Id: I2236790435d89962d70c642fa1879d44981bc71b
parent 318bc929
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -97,12 +97,4 @@
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>

    <ViewStub
        android:id="@+id/ticker_stub"
        android:inflatedId="@+id/ticker"
        android:layout="@layout/status_bar_ticker"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

</com.android.systemui.statusbar.phone.PhoneStatusBarView>
+0 −62
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  - Copyright 2014, 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.
  -->
<LinearLayout android:id="@+id/ticker"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingStart="6dip"
    android:animationCache="false"
    android:orientation="horizontal">

    <ImageSwitcher android:id="@+id/tickerIcon"
        android:layout_width="@dimen/status_bar_icon_size"
        android:layout_height="@dimen/status_bar_icon_size"
        android:layout_marginEnd="4dip"
        >
        <com.android.systemui.statusbar.AnimatedImageView
            android:layout_width="@dimen/status_bar_icon_size"
            android:layout_height="@dimen/status_bar_icon_size"
            android:scaleType="center"
            />
        <com.android.systemui.statusbar.AnimatedImageView
            android:layout_width="@dimen/status_bar_icon_size"
            android:layout_height="@dimen/status_bar_icon_size"
            android:scaleType="center"
            />
    </ImageSwitcher>
    <com.android.systemui.statusbar.phone.TickerView android:id="@+id/tickerText"
        android:layout_width="0dip"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:paddingTop="2dip"
        android:paddingEnd="10dip">
        <TextView
            android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            />
        <TextView
            android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            />
    </com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
+0 −5
Original line number Diff line number Diff line
@@ -222,11 +222,6 @@
         be 'platform' or 'noisy' (i.e. for noisy touch screens). -->
    <string name="velocity_tracker_impl" translatable="false">platform</string>

    <!-- Set to true to enable the classic notification ticker that scrolls
         Notification.tickerText across the status bar for what seems like an
         eternity. -->
    <bool name="enable_ticker">false</bool>

    <!-- Set to true to enable the user switcher on the keyguard. -->
    <bool name="config_keyguardUserSwitcher">false</bool>

+0 −6
Original line number Diff line number Diff line
@@ -212,12 +212,6 @@
        <item name="android:windowExitAnimation">@anim/heads_up_exit</item>
    </style>

    <style name="TextAppearance.StatusBar.PhoneTicker"
        parent="@*android:style/TextAppearance.StatusBar.Ticker">
        <!-- Note: must be dp to fit in status bar -->
        <item name="android:textSize">14dp</item>
    </style>

    <style name="systemui_theme" parent="@android:style/Theme.DeviceDefault">
        <item name="android:colorPrimary">@color/system_primary_color</item>
        <item name="android:colorControlActivated">@color/system_accent_color</item>
+0 −11
Original line number Diff line number Diff line
@@ -1808,10 +1808,8 @@ public abstract class BaseStatusBar extends SystemUI implements
        setShowLockscreenNotifications(show && allowedByDpm);
    }

    protected abstract void haltTicker();
    protected abstract void setAreThereNotifications();
    protected abstract void updateNotifications();
    protected abstract void tick(StatusBarNotification n, boolean firstTime);
    protected abstract void updateExpandedViewPos(int expandedPosition);
    protected abstract boolean shouldDisableNavbarGestures();

@@ -1897,9 +1895,6 @@ public abstract class BaseStatusBar extends SystemUI implements
                        && oldPublicContentView.getPackage() != null
                        && oldPublicContentView.getPackage().equals(publicContentView.getPackage())
                        && oldPublicContentView.getLayoutId() == publicContentView.getLayoutId());
        boolean updateTicker = n.tickerText != null
                && !TextUtils.equals(n.tickerText,
                oldEntry.notification.getNotification().tickerText);

        final boolean shouldInterrupt = shouldInterrupt(notification);
        final boolean alertAgain = alertAgain(oldEntry, n);
@@ -2005,12 +2000,6 @@ public abstract class BaseStatusBar extends SystemUI implements
        boolean isForCurrentUser = isNotificationForCurrentProfiles(notification);
        if (DEBUG) Log.d(TAG, "notification is " + (isForCurrentUser ? "" : "not ") + "for you");

        // Restart the ticker if it's still running
        if (updateTicker && isForCurrentUser) {
            haltTicker();
            tick(notification, false);
        }

        // Recalculate the position of the sliding windows and the titles.
        setAreThereNotifications();
        updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
Loading