class MraidController {

    @TargetApi(VERSION_CODES.HONEYCOMB_MR2)
    @VisibleForTesting
    boolean shouldAllowForceOrientation(final MraidOrientation newOrientation) {
        // NONE is the default and always allowed
        if (newOrientation == MraidOrientation.NONE) {
            return true;
        }

        // If we can't obtain an Activity context, return false
        if (mActivity == null) {
            return false;
        }

        final ActivityInfo activityInfo;
        try {
            activityInfo = mActivity.getPackageManager().getActivityInfo(
                    new ComponentName(mActivity, mActivity.getClass()), 0);
        } catch (PackageManager.NameNotFoundException e) {
            return false;
        }

        // If an orientation is explicitly declared in the manifest, allow forcing this orientation
        final int activityOrientation = activityInfo.screenOrientation;
        if (activityOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
            return activityOrientation == newOrientation.getActivityInfoOrientation();
        }

        // Make sure the config changes won't tear down the activity when moving to this orientation
        // The necessary configChanges must always include "orientation"
        boolean containsNecessaryConfigChanges =
                bitMaskContainsFlag(activityInfo.configChanges, CONFIG_ORIENTATION);

        // And on API 13+, configChanges must also include "screenSize"
        if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB_MR2) {
            containsNecessaryConfigChanges = containsNecessaryConfigChanges
                    && bitMaskContainsFlag(activityInfo.configChanges, CONFIG_SCREEN_SIZE);
        }

        return containsNecessaryConfigChanges;
    }

    public  MraidController(@NonNull Context context, @NonNull AdConfiguration adConfiguration,
            @NonNull PlacementType placementType);
    @VisibleForTesting  MraidController(@NonNull Context context, @NonNull AdConfiguration adConfiguration,
            @NonNull PlacementType placementType,
            @NonNull MraidBridge bridge, @NonNull MraidBridge twoPartBridge,
            @NonNull ScreenMetricsWaiter screenMetricsWaiter);

}