Messaging: Remove GServices
We don't have an actual implementation returning anything but the defaults, so apply the defaults directly anywhere we need them Change-Id: Ic651b4b13977799f2f4d2c702c430798fbff77f8
This commit is contained in:
@@ -40,27 +40,12 @@ public final class Assert {
|
||||
sShouldCrash = sIsEngBuild = true;
|
||||
}
|
||||
|
||||
private static void refreshGservices(final BugleGservices gservices) {
|
||||
sShouldCrash = sIsEngBuild;
|
||||
if (!sShouldCrash) {
|
||||
sShouldCrash = gservices.getBoolean(
|
||||
BugleGservicesKeys.ASSERTS_FATAL,
|
||||
BugleGservicesKeys.ASSERTS_FATAL_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
// Static initializer block to find out if we're running an eng or
|
||||
// release build.
|
||||
static {
|
||||
setIfEngBuild();
|
||||
}
|
||||
|
||||
// This is called from FactoryImpl once the Gservices class is initialized.
|
||||
public static void initializeGservices (final BugleGservices gservices) {
|
||||
gservices.registerForChanges(() -> refreshGservices(gservices));
|
||||
refreshGservices(gservices);
|
||||
}
|
||||
|
||||
/**
|
||||
* Halt execution if this is not an eng build.
|
||||
* <p>Intended for use in code paths that should be run only for tests and never on
|
||||
|
||||
Reference in New Issue
Block a user