)]}'
{
  "commit": "ddf87effa4d80f413a80fde861f73877ccd80599",
  "tree": "0e89ff4a5be97c07c81bc11c36f5e8741fca9eed",
  "parents": [
    "28355761d73f1495bba8994dc3c0dc631ae245a8"
  ],
  "author": {
    "name": "Jean-Michel Trivi",
    "email": "jmtrivi@google.com",
    "time": "Tue Aug 20 15:42:04 2019 -0700"
  },
  "committer": {
    "name": "Jean-Michel Trivi",
    "email": "jmtrivi@google.com",
    "time": "Mon Aug 26 16:00:34 2019 -0700"
  },
  "message": "AudioFlinger: enforce OP_RECORD_AUDIO during recording\n\n  Fix issue where RecordTrack silencing didn\u0027t silence the\nfull buffer: the memset to 0 was using the RecordThread frame\nsize, not the RecordTrack frame size.\n  OP_RECORD_AUDIO was only enforced at the start of a recording\nwhich would fail if not granted. This patch silences the recording\n(i.e. silence is recorded instead) when it is lost, and undoes that\nwhen granted again. This requires:\n- propagating the package name of the client to the RecordTrack class\n- registering an appOp callback in RecordTrack (through a new\n  OpRecordAudioMonitor class) to (un)silence the recording\n- update the isSilenced() method to take into account the appOp.\n\nBug: 138968594\nTest: run app that records audio, then \"adb shell appops __pack_name__ 27 2\"\n     and verify recording is silent after that.\n\nChange-Id: Ib33f5b592185a67204997213bab1ac2594d90d37\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "355d9455af2b99cdff33f200cef7a22cd141da1f",
      "old_mode": 33188,
      "old_path": "services/audioflinger/AudioFlinger.cpp",
      "new_id": "b6da11edd08b3a403a773f35ced02c337a52a2c2",
      "new_mode": 33188,
      "new_path": "services/audioflinger/AudioFlinger.cpp"
    },
    {
      "type": "modify",
      "old_id": "08660dd67afce6af69266db58b259b23ee70444d",
      "old_mode": 33188,
      "old_path": "services/audioflinger/RecordTracks.h",
      "new_id": "c8397cd127cc893036fa6638715d5e53149e5012",
      "new_mode": 33188,
      "new_path": "services/audioflinger/RecordTracks.h"
    },
    {
      "type": "modify",
      "old_id": "cf15045db014439dc37fa574c2c87ec161632539",
      "old_mode": 33188,
      "old_path": "services/audioflinger/Threads.cpp",
      "new_id": "d7d5edadb81a49793546597c0b870a2bb6b2bb6b",
      "new_mode": 33188,
      "new_path": "services/audioflinger/Threads.cpp"
    },
    {
      "type": "modify",
      "old_id": "fc8aa13cbb5cbbff463ed23afec15956135c8811",
      "old_mode": 33188,
      "old_path": "services/audioflinger/Threads.h",
      "new_id": "87bebf3d89ae2f13fe3042156d647ad065a47cf2",
      "new_mode": 33188,
      "new_path": "services/audioflinger/Threads.h"
    },
    {
      "type": "modify",
      "old_id": "8f720b58d5fa96da00dc259cbe9e30c26198ebb0",
      "old_mode": 33188,
      "old_path": "services/audioflinger/TrackBase.h",
      "new_id": "65589e2ddace7dea31ceeebba1645eb1e52eae84",
      "new_mode": 33188,
      "new_path": "services/audioflinger/TrackBase.h"
    },
    {
      "type": "modify",
      "old_id": "78db80ca0aa70df6f551d1376d8830dc10ecb099",
      "old_mode": 33188,
      "old_path": "services/audioflinger/Tracks.cpp",
      "new_id": "2a5a713ca3cce0270f51ccc7ed58e930ea582051",
      "new_mode": 33188,
      "new_path": "services/audioflinger/Tracks.cpp"
    }
  ]
}
