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

Commit 978a008e authored by Alon Albert's avatar Alon Albert
Browse files

Add ID To Logs

Because there may be more than one widget

Change-Id: Ie75f0c41b687614600fb32d7ebdd91bd64c050bf
parent 7c081be2
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -62,26 +62,26 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo
        public QuarterHourUpdater(Context context) {
        public QuarterHourUpdater(Context context) {
            mUpdaterContext = context;
            mUpdaterContext = context;
            // Chasing bug b/8239532 - log every updater creation
            // Chasing bug b/8239532 - log every updater creation
            Log.i(TAG, "QuarterHourUpdater.start: " + this);
            Log.i(TAG, String.format("QuarterHourUpdater.start(%d): %s", mId, this));
            Utils.setQuarterHourUpdater(mHandler, this);
            Utils.setQuarterHourUpdater(mHandler, this);
        }
        }


        public void reset() {
        public void reset() {
            // Chasing bug b/8239532 - log every updater reset
            // Chasing bug b/8239532 - log every updater reset
            Log.i(TAG, "QuarterHourUpdater.reset: " + this);
            Log.i(TAG, String.format("QuarterHourUpdater.reset(%d): %s", mId, this));
            Utils.setQuarterHourUpdater(mHandler, this);
            Utils.setQuarterHourUpdater(mHandler, this);
        }
        }


        public void close() {
        public void close() {
            Utils.cancelQuarterHourUpdater(mHandler, this);
            Utils.cancelQuarterHourUpdater(mHandler, this);
            // Chasing bug b/8239532 - log every updater closure
            // Chasing bug b/8239532 - log every updater closure
            Log.i(TAG, "QuarterHourUpdater.close: " + this);
            Log.i(TAG, String.format("QuarterHourUpdater.close(%d): %s", mId, this));
        }
        }


        @Override
        @Override
        public void run() {
        public void run() {
            // Chasing bug b/8239532 - log every run we get to can see when run ran.
            // Chasing bug b/8239532 - log every run we get to can see when run ran.
            Log.i(TAG, "QuarterHourUpdater.run: " + this);
            Log.i(TAG, String.format("QuarterHourUpdater.run(%d): %s", mId, this));
            // Since the system may miss or not send time zone changes in all cases
            // Since the system may miss or not send time zone changes in all cases
            // make sure to update the world clock list if the time zone
            // make sure to update the world clock list if the time zone
            // changed in the last 15 minutes
            // changed in the last 15 minutes
@@ -253,7 +253,7 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo
        filter.addAction(Intent.ACTION_LOCALE_CHANGED);
        filter.addAction(Intent.ACTION_LOCALE_CHANGED);
        filter.addAction(AlarmNotifications.SYSTEM_ALARM_CHANGE_ACTION);
        filter.addAction(AlarmNotifications.SYSTEM_ALARM_CHANGE_ACTION);
        filter.addAction(Cities.WORLDCLOCK_UPDATE_INTENT);
        filter.addAction(Cities.WORLDCLOCK_UPDATE_INTENT);
        Log.i(TAG, "DigitalWidget register receiver");
        Log.i(TAG, "DigitalWidget register receiver " + mId);
        mContext.registerReceiver(this, filter);
        mContext.registerReceiver(this, filter);
    }
    }


@@ -274,7 +274,7 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo


    @Override
    @Override
    public void onDestroy() {
    public void onDestroy() {
        Log.i(TAG, "DigitalWidget unregister receiver");
        Log.i(TAG, "DigitalWidget unregister receiver " + mId);
        mQuarterHourUpdater.close();
        mQuarterHourUpdater.close();
        mContext.unregisterReceiver(this);
        mContext.unregisterReceiver(this);
    }
    }
@@ -284,7 +284,7 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo
    public void onReceive(Context context, Intent intent) {
    public void onReceive(Context context, Intent intent) {
        // Chasing bug b/8239532 - log every intent we get so we can see what the last intent
        // Chasing bug b/8239532 - log every intent we get so we can see what the last intent
        // received was and when we got it.
        // received was and when we got it.
        Log.i(TAG, "onReceive: " + intent);
        Log.i(TAG, String.format("onReceive(%d): %s", mId, intent));
        if (mId == AppWidgetManager.INVALID_APPWIDGET_ID) {
        if (mId == AppWidgetManager.INVALID_APPWIDGET_ID) {
            return;
            return;
        }
        }