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

Commit 6475786a authored by Joe Onorato's avatar Joe Onorato Committed by Android Git Automerger
Browse files

am 66d7d01e: Get icon updating working.

parents 5581c500 66d7d01e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.policy.statusbar.phone;

import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.util.Slog;

import com.android.internal.statusbar.IStatusBar;
import com.android.internal.statusbar.StatusBarIcon;
@@ -72,7 +72,7 @@ class CommandQueue extends IStatusBar.Stub {
    private final class H extends Handler {
        public void handleMessage(Message msg) {
            int what = msg.what & MSG_MASK;
            switch (msg.what) {
            switch (what) {
                case MSG_ICON: {
                    int index = msg.what & INDEX_MASK;
                    int viewIndex = mList.getViewIndex(index);
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ public class StatusBarIconView extends AnimatedImageView {
    }

    private static boolean streq(String a, String b) {
        if (a == b) {
            return true;
        }
        if (a == null && b != null) {
            return false;
        }
+1 −1
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ public abstract class StatusBarService extends Service implements CommandQueue.C
    public void onCreate() {
        // Connect in to the status bar manager service
        StatusBarIconList iconList = new StatusBarIconList();
        mCommandQueue = new CommandQueue(this, iconList);
        mBarService = IStatusBarService.Stub.asInterface(
                ServiceManager.getService(Context.STATUS_BAR_SERVICE));
        try {
@@ -66,7 +67,6 @@ public abstract class StatusBarService extends Service implements CommandQueue.C
        }

        // Set up the initial icon state
        mCommandQueue = new CommandQueue(this, iconList);
        final int N = iconList.size();
        int viewIndex = 0;
        for (int i=0; i<N; i++) {
+1 −3
Original line number Diff line number Diff line
@@ -196,6 +196,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub
            }

            StatusBarIcon icon = new StatusBarIcon(iconPackage, iconId, iconLevel);
            //Slog.d(TAG, "setIcon slot=" + slot + " index=" + index + " icon=" + icon);
            mIcons.setIcon(index, icon);

            // Tell the client.  If it fails, it'll restart soon and we'll sync up.
@@ -287,9 +288,6 @@ public class StatusBarManagerService extends IStatusBarService.Stub
    // ================================================================================
    // Can be called from any thread
    // ================================================================================
    public void setIconVisibility(IBinder key, boolean visible) {
        addPendingOp(OP_SET_VISIBLE, key, visible);
    }

    private void addPendingOp(int code, IBinder key, IconData data, NotificationData n, int i) {
        synchronized (mQueueLock) {