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

Commit 42a46157 authored by Jim Miller's avatar Jim Miller
Browse files

Fix 3379239: Catch exceptions from workaround for OOM.

This catches possible exceptions caused by attempting to
unregister a receiver that may have already been unregistered.
This is related to the OOM issue workaround in Change I99a7e0c3.

Change-Id: Ib69a8acc6b12659125c958a03efac0a8a68a3859
parent 1c9761e3
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -80,7 +80,11 @@ public class DigitalClock extends LinearLayout {
                    }
                });
            } else {
                try {
                    mContext.unregisterReceiver(this);
                } catch (RuntimeException e) {
                    // Shouldn't happen
                }
            }
        }
    };
@@ -124,7 +128,11 @@ public class DigitalClock extends LinearLayout {
                digitalClock.setDateFormat();
                digitalClock.updateTime();
            } else {
                try {
                    mContext.getContentResolver().unregisterContentObserver(this);
                } catch (RuntimeException e) {
                    // Shouldn't happen
                }
            }
        }
    }