Skip to content
Snippets Groups Projects
  • Svet Ganov's avatar
    b9a1e7ba
    Don't record audio if UID is idle - sepolicy · b9a1e7ba
    Svet Ganov authored
    If a UID is in an idle state we don't allow recording to protect
    user's privacy. If the UID is in an idle state we allow recording
    but report empty data (all zeros in the byte array) and once
    the process goes in an active state we report the real mic data.
    This avoids the race between the app being notified aboout its
    lifecycle and the audio system being notified about the state
    of a UID.
    
    Test: Added - AudioRecordTest#testRecordNoDataForIdleUids
          Passing - cts-tradefed run cts-dev -m CtsMediaTestCases
                  -t android.media.cts.AudioRecordTest
    
    bug:63938985
    
    Change-Id: I8c044e588bac4182efcdc08197925fddf593a717
    b9a1e7ba
    History
    Don't record audio if UID is idle - sepolicy
    Svet Ganov authored
    If a UID is in an idle state we don't allow recording to protect
    user's privacy. If the UID is in an idle state we allow recording
    but report empty data (all zeros in the byte array) and once
    the process goes in an active state we report the real mic data.
    This avoids the race between the app being notified aboout its
    lifecycle and the audio system being notified about the state
    of a UID.
    
    Test: Added - AudioRecordTest#testRecordNoDataForIdleUids
          Passing - cts-tradefed run cts-dev -m CtsMediaTestCases
                  -t android.media.cts.AudioRecordTest
    
    bug:63938985
    
    Change-Id: I8c044e588bac4182efcdc08197925fddf593a717
audioserver.te 2.81 KiB