Merge "Update comment and make change backward compatible." am: 176fca7d51 am: 4fd8a47d3e

Change-Id: I5900e0ea4864058c76b28789928b63f21fdd7e94
diff --git a/src/java/android/net/rtp/AudioGroup.java b/src/java/android/net/rtp/AudioGroup.java
index 697c3ab..9d96006 100644
--- a/src/java/android/net/rtp/AudioGroup.java
+++ b/src/java/android/net/rtp/AudioGroup.java
@@ -114,8 +114,7 @@
 
     /**
      * Creates an empty AudioGroup.
-     * @param context Context used to get package name. If context is null, app ops checks will
-     * fail and as a result {@link AudioStream#join(AudioGroup)} may fail.
+     * @param context Context used to get package name
      */
     public AudioGroup(@NonNull Context context) {
         mContext = context;
@@ -168,7 +167,8 @@
                 long id = nativeAdd(stream.getMode(), stream.getSocket(),
                         stream.getRemoteAddress().getHostAddress(),
                         stream.getRemotePort(), codecSpec, stream.getDtmfType(),
-                        mContext != null ? mContext.getOpPackageName() : null);
+                        mContext != null ? mContext.getOpPackageName()
+                                : ActivityThread.currentOpPackageName());
                 mStreams.put(stream, id);
             } catch (NullPointerException e) {
                 throw new IllegalStateException(e);