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

Commit ac22dc0c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "powerstats: Print exception message in wrapper" into sc-dev

parents 92d9a9a7 80ec0f80
Loading
Loading
Loading
Loading
+7 −10
Original line number Original line Diff line number Diff line
@@ -166,7 +166,7 @@ public final class PowerStatsHALWrapper {
                try {
                try {
                    powerEntityHAL = sVintfPowerStats.get().getPowerEntityInfo();
                    powerEntityHAL = sVintfPowerStats.get().getPowerEntityInfo();
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) Slog.d(TAG, "Failed to get power entity info from PowerStats HAL");
                    Slog.w(TAG, "Failed to get power entity info: ", e);
                }
                }
            }
            }


@@ -183,7 +183,7 @@ public final class PowerStatsHALWrapper {
                    stateResidencyResultHAL =
                    stateResidencyResultHAL =
                        sVintfPowerStats.get().getStateResidency(powerEntityIds);
                        sVintfPowerStats.get().getStateResidency(powerEntityIds);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) Slog.d(TAG, "Failed to get state residency from PowerStats HAL");
                    Slog.w(TAG, "Failed to get state residency: ", e);
                }
                }
            }
            }


@@ -198,9 +198,7 @@ public final class PowerStatsHALWrapper {
                try {
                try {
                    energyConsumerHAL = sVintfPowerStats.get().getEnergyConsumerInfo();
                    energyConsumerHAL = sVintfPowerStats.get().getEnergyConsumerInfo();
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) {
                    Slog.w(TAG, "Failed to get energy consumer info: ", e);
                        Slog.d(TAG, "Failed to get energy consumer info from PowerStats HAL");
                    }
                }
                }
            }
            }


@@ -217,9 +215,7 @@ public final class PowerStatsHALWrapper {
                    energyConsumedHAL =
                    energyConsumedHAL =
                        sVintfPowerStats.get().getEnergyConsumed(energyConsumerIds);
                        sVintfPowerStats.get().getEnergyConsumed(energyConsumerIds);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) {
                    Slog.w(TAG, "Failed to get energy consumer results: ", e);
                        Slog.d(TAG, "Failed to get energy consumer results from PowerStats HAL");
                    }
                }
                }
            }
            }


@@ -234,7 +230,7 @@ public final class PowerStatsHALWrapper {
                try {
                try {
                    energyMeterInfoHAL = sVintfPowerStats.get().getEnergyMeterInfo();
                    energyMeterInfoHAL = sVintfPowerStats.get().getEnergyMeterInfo();
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) Slog.d(TAG, "Failed to get energy meter info from PowerStats HAL");
                    Slog.w(TAG, "Failed to get energy meter info: ", e);
                }
                }
            }
            }


@@ -250,7 +246,7 @@ public final class PowerStatsHALWrapper {
                    energyMeasurementHAL =
                    energyMeasurementHAL =
                        sVintfPowerStats.get().readEnergyMeter(channelIds);
                        sVintfPowerStats.get().readEnergyMeter(channelIds);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    if (DEBUG) Slog.d(TAG, "Failed to get energy measurements from PowerStats HAL");
                    Slog.w(TAG, "Failed to get energy measurements: ", e);
                }
                }
            }
            }


@@ -367,6 +363,7 @@ public final class PowerStatsHALWrapper {


        @Override
        @Override
        public synchronized void binderDied() {
        public synchronized void binderDied() {
            Slog.w(TAG, "PowerStats HAL died");
            mInstance = null;
            mInstance = null;
        }
        }
    }
    }