Family Controls Issues with Multiple Functionalities

I am developing an application that utilizes Family Controls to restrict the use of certain apps. Currently, I am using the following extensions: DeviceActivityMonitor, ShieldConfiguration, and ShieldAction.

Issue Overview: While blocking a single application functions correctly, a problem arises when implementing multiple functionalities that use these extensions for the same application.

STEPS TO REPRODUCE

  • Functionality 1: Maximum Time in App

Description: Blocks the app after 15 minutes of continuous use.

  • Functionality 2: Conscious Opening

Description: Upon opening the app, it is blocked for 10 seconds and then automatically unlocked.

Steps to Reproduce the Bug:

  • Open the Application:

The app opens normally.

  • Trigger Functionality 2

The app is blocked and displays the blocking screen corresponding to Functionality 2: Conscious Opening.

  • Continue Using the App

After 10 seconds, the app unlocks, and I continue using it. Important: If the app is closed at this point, the bug does not occur.

  • Trigger Functionality 1 After 15 Minutes

After 15 minutes of continuous use, the app should block according to Functionality 1: Maximum Time in App. Expected Behavior: The blocking screen for Functionality 1 is displayed. Actual Behavior: The blocking screen for Functionality 2 is displayed instead.

Technical Observations:

  • By adding logs in ShieldConfiguration, I observed that the configuration does not refresh correctly when the app is blocked a second time while still in use.
  • If the app is closed and reopened, the correct blocking screen for Functionality 1 is displayed as expected.
Family Controls Issues with Multiple Functionalities
 
 
Q