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

Unverified Commit efa267fe authored by LuK1337's avatar LuK1337
Browse files

PowerShareTile: Catch all exceptions

"Fixes": https://gitlab.com/LineageOS/issues/android/-/issues/8958
Change-Id: I5a7a893137580ff11bf2c4c999680115c50d1ebf
parent 8e028104
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ public class PowerShareTile extends QSTileImpl<BooleanState>
        if (mBatteryController.isPowerSave()) {
            try {
                mPowerShare.setEnabled(false);
            } catch (RemoteException | ServiceSpecificException ex) {
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
@@ -135,7 +135,7 @@ public class PowerShareTile extends QSTileImpl<BooleanState>
            } else {
                mNotificationManager.cancel(NOTIFICATION_ID);
            }
        } catch (RemoteException | ServiceSpecificException ex) {
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
@@ -157,7 +157,7 @@ public class PowerShareTile extends QSTileImpl<BooleanState>
        try {
            mPowerShare.setEnabled(!mPowerShare.isEnabled());
            refreshState();
        } catch (RemoteException | ServiceSpecificException ex) {
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
@@ -190,7 +190,7 @@ public class PowerShareTile extends QSTileImpl<BooleanState>
        state.hasLongClickEffect = false;
        try {
            state.value = mPowerShare.isEnabled();
        } catch (RemoteException | ServiceSpecificException ex) {
        } catch (Exception ex) {
            state.value = false;
            ex.printStackTrace();
        }
@@ -229,7 +229,7 @@ public class PowerShareTile extends QSTileImpl<BooleanState>
    private int getMinBatteryLevel() {
        try {
            return mPowerShare.getMinBattery();
        } catch (RemoteException | ServiceSpecificException ex) {
        } catch (Exception ex) {
            ex.printStackTrace();
        }