Skip to content

Commit

Permalink
Revert "feat(fcm): Enabled direct_boot_ok Android Config parameter."
Browse files Browse the repository at this point in the history
This reverts commit 6651302.
  • Loading branch information
jonathanedey committed Nov 20, 2023
1 parent 1a1b3f0 commit 7245194
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
11 changes: 0 additions & 11 deletions firebase_admin/_messaging_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,6 @@ def check_analytics_label(cls, label, value):
raise ValueError('Malformed {}.'.format(label))
return value

@classmethod
def check_boolean(cls, label, value):
"""Checks if the given value is boolean."""
if value is None:
return None
if not isinstance(value, bool):
raise ValueError('{0} must be a boolean.'.format(label))
return value

@classmethod
def check_datetime(cls, label, value):
"""Checks if the given value is a datetime."""
Expand Down Expand Up @@ -223,8 +214,6 @@ def encode_android_fcm_options(cls, fcm_options):
result = {
'analytics_label': _Validators.check_analytics_label(
'AndroidFCMOptions.analytics_label', fcm_options.analytics_label),
'direct_boot_ok': _Validators.check_boolean(
'AndroidFCMOptions.direct_boot_ok', fcm_options.direct_boot_ok)
}
result = cls.remove_null_values(result)
return result
Expand Down
5 changes: 1 addition & 4 deletions firebase_admin/_messaging_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,10 @@ class AndroidFCMOptions:
Args:
analytics_label: contains additional options for features provided by the FCM Android SDK
(optional).
direct_boot_ok: A boolean indicating whether messages will be allowed to be delivered to
the app while the device is in direct boot mode.
"""

def __init__(self, analytics_label=None, direct_boot_ok=None):
def __init__(self, analytics_label=None):
self.analytics_label = analytics_label
self.direct_boot_ok = direct_boot_ok


class WebpushConfig:
Expand Down

0 comments on commit 7245194

Please sign in to comment.