public static void setRequiresUserConsent ( boolean value ) { if ( ! sIsInitialized ) { // We can't read hasUserConsent() before we're initialized sRequiresUserConsent = value ; } else { boolean hadUserConsent = hasUserConsent ( ) ; sRequiresUserConsent = value ; Log . w ( TAG , "WonderPush.setRequiresUserConsent(" + value + ") called after WonderPush.initialize(). Although supported, a proper implementation typically only calls it before." ) ; // Refresh user consent boolean nowHasUserConsent = hasUserConsent ( ) ; if ( hadUserConsent != nowHasUserConsent ) { hasUserConsentChanged ( nowHasUserConsent ) ; } } }
Sets whether user consent is required before the SDK is allowed to work .