switch (event.getType()) {
case BundleEvent.UPDATED :
// fall through to INSTALLED
case BundleEvent.INSTALLED :
TrustEngineListener listener = TrustEngineListener.getInstance();
AuthorizationEngine authEngine = listener == null ? null : listener.getAuthorizationEngine();
if (authEngine != null) {
BaseData baseData = (BaseData) ((AbstractBundle) bundle).getBundleData();
SignedStorageHook hook = (SignedStorageHook) baseData.getStorageHook(SignedStorageHook.KEY);
SignedContent signedContent = hook != null ? hook.signedContent : null;
authEngine.authorize(signedContent, bundle);
}
break;
default :
break;
}