Catch IllegalStateException in StatsManager
StatsManagerService throws IllegalStateException when statsd is not available. This causes GMSCore to crash. Bug: 149914783 Test: Manual, verify play store no longer crashes Change-Id: I45cd679600ccfdb7977ecfd4437b62f56034fed2
This commit is contained in:
@@ -159,6 +159,9 @@ public final class StatsManager {
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to addConfig in statsmanager");
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,6 +198,9 @@ public final class StatsManager {
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to removeConfig in statsmanager");
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,6 +397,9 @@ public final class StatsManager {
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to getReports in statsmanager");
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -428,6 +437,9 @@ public final class StatsManager {
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to getStatsMetadata in statsmanager");
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -469,6 +481,9 @@ public final class StatsManager {
|
||||
+ "registered experiment IDs");
|
||||
}
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to getRegisteredExperimentIds in statsmanager");
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user