transcoding: add SimulatedTranscoder to test service

- Add SimulatedTranscoder (which is an upgraded version of
  DummyTranscoder) to allow more testing of the service.

- Add unit test that launches dummy test apps from shell
  to simulate uid policy change.

bug: 154734285
bug: 145233472
test: unit tests

Change-Id: Ic169757d64ad8da7eebd0e1febdcbfb467fe81f4
diff --git a/media/libmediatranscoding/TranscodingUidPolicy.cpp b/media/libmediatranscoding/TranscodingUidPolicy.cpp
index 9c8d3fe..36bb264 100644
--- a/media/libmediatranscoding/TranscodingUidPolicy.cpp
+++ b/media/libmediatranscoding/TranscodingUidPolicy.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-// #define LOG_NDEBUG 0
+//#define LOG_NDEBUG 0
 #define LOG_TAG "TranscodingUidPolicy"
 
 #include <binder/ActivityManager.h>
@@ -224,8 +224,9 @@
 }
 
 void TranscodingUidPolicy::updateTopUid_l() {
-    // Update top uid state.
     mTopUidState = ActivityManager::PROCESS_STATE_UNKNOWN;
+
+    // Find the lowest uid state (ignoring PROCESS_STATE_UNKNOWN) with some monitored uids.
     for (auto stateIt = mStateUidMap.begin(); stateIt != mStateUidMap.end(); stateIt++) {
         if (stateIt->first != ActivityManager::PROCESS_STATE_UNKNOWN && !stateIt->second.empty()) {
             mTopUidState = stateIt->first;