ParentalControlsPreferenceWriterTmGlue
Experimental
A module-private implementation of IParentalControlsComponent that invokes the TM. Factory-constructed by ParentalControlsComponent.
available in com.amazon.kepler.parental_controls_experimental_beta2_20240214
Implements
Constructors
new ParentalControlsPreferenceWriterTmGlue()
new ParentalControlsPreferenceWriterTmGlue():
ParentalControlsPreferenceWriterTmGlue
Experimental
Returns
ParentalControlsPreferenceWriterTmGlue
Methods
invokePconEnablementWorkflow()
invokePconEnablementWorkflow(
enable
):Promise
<IEnablementWorkflowResponse
>
Experimental
Parameters
enable
boolean
true
to enable PCON; false
to disable
Returns
Promise
<IEnablementWorkflowResponse
>
Brief
Enable/disable PCON, gated by a PIN challenge modal dialog to establish parental consent.
This method enables or disables parental control services for the device. Changing the enablement state (in either direction) requires admin ("parental") consent, so invoking this method will present a PIN challenge to the user in the form of an unescapable modal dialog; that is, the user must either successfully validate their PIN or cancel the validation. Attempts to navigate away from the PIN challenge (such as by pressing back or a provider shortcut on the remote) will implicitly cancel PIN validation.
If a PIN is not already established, then this method instead invokes the first-time setup workflow.
The {@ref gateContentPlaybackListener} listener is invoked once the request has been resolved by PCON (either because the PIN challenge was successfully validated or was unnecessary). The modal dialog has no timeout, so integrators should take into account that the listener may not be invoked immediately. The PCON dialog will remain in the foreground until it is resolved.
Throws
NotAuthorizedError if required privilege(s) are not declared and signed in the caller's application manifest.
Throws
NotInternetConnectedError
Note
this method is idempotent, meaning that attempting to enable/disable PCON when it is already in that state will not result in either a PIN challenge nor in the issuance of a state change event.
Par
Side Effects If the enabled state of PCON changes, an event with the URI IPconStateChangeEventPayload::PCON_ON_STATE_CHANGE_TOPIC is published.
Pre
caller requires privilege
com.amazon.kepler.parental_controls.write-pref-enablement
Pre
the device must be internet-connected or the PIN must be cached from a previous successful PIN challenge. First time setup cannot be completed without internet connectivity.
Implementation of
IParentalControlsPreferenceWriter
.invokePconEnablementWorkflow
setContentRestrictionLevel()
setContentRestrictionLevel(
contentRestrictionLevelName
):Promise
<void
>
Experimental
Parameters
contentRestrictionLevelName
string
Returns
Promise
<void
>
Pre
caller requires privilege
com.amazon.kepler.parental_controls.write-pref-contentrestriction
Implementation of
IParentalControlsPreferenceWriter
.setContentRestrictionLevel
setPconEnablement()
setPconEnablement(
enable
):Promise
<void
>
Experimental
Parameters
enable
boolean
true
to enable PCON; false
to disable
Returns
Promise
<void
>
Throws
SecurityError if required privilege(s) are not declared and signed in the caller's application manifest.
!note this method is idempotent, meaning that attempting to enable/disable PCON when it is already in that state will not result in the issuance of a state change event.
Caller requires privilege
com.amazon.kepler.parental_controls.write-pref-noninteractive-enable
to
enable Parental Controls.
Caller requires privilege
com.amazon.kepler.parental_controls.write-pref-noninteractive-disable
to
disable Parental Controls.
The account PIN must be established in order to enable Parental Controls. (Disablement does not have this requirement).
Implementation of
IParentalControlsPreferenceWriter
.setPconEnablement
setPinProtectAppLaunchPreference()
setPinProtectAppLaunchPreference(
enable
):Promise
<void
>
Experimental
Parameters
enable
boolean
Returns
Promise
<void
>
Pre
caller requires privilege
com.amazon.kepler.parental_controls.write-pref-pinprotect-applaunch
Implementation of
IParentalControlsPreferenceWriter
.setPinProtectAppLaunchPreference
setPinProtectProfileSwitchPreference()
setPinProtectProfileSwitchPreference(
enable
):Promise
<void
>
Experimental
Parameters
enable
boolean
Returns
Promise
<void
>
Pre
caller requires privilege
com.amazon.kepler.parental_controls.write-pref-pinprotect-profileswitch
Implementation of
IParentalControlsPreferenceWriter
.setPinProtectProfileSwitchPreference
setPinProtectPurchasePreference()
setPinProtectPurchasePreference(
enable
):Promise
<void
>
Experimental
Parameters
enable
boolean
Returns
Promise
<void
>
Pre
caller requires privilege
com.amazon.kepler.parental_controls.write-pref-pinprotect-purchase
Implementation of
IParentalControlsPreferenceWriter
.setPinProtectPurchasePreference
Last updated: Sep 30, 2025