Loading drm/java/android/drm/DrmInfo.java +14 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ public class DrmInfo { mInfoType = infoType; mMimeType = mimeType; mData = data; if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType + "," + "data: " + data; throw new IllegalArgumentException(msg); } } /** Loading @@ -69,6 +76,13 @@ public class DrmInfo { // call would fail with IllegalArgumentException because of mData = null mData = null; } if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType + "," + "data: " + mData; throw new IllegalArgumentException(); } } /** Loading drm/java/android/drm/DrmInfoRequest.java +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,11 @@ public class DrmInfoRequest { public DrmInfoRequest(int infoType, String mimeType) { mInfoType = infoType; mMimeType = mimeType; if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType; throw new IllegalArgumentException(msg); } } /** Loading drm/java/android/drm/DrmInfoStatus.java +4 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public class DrmInfoStatus { * @param _mimeType The MIME type. */ public DrmInfoStatus(int _statusCode, int _infoType, ProcessedData _data, String _mimeType) { if (!DrmInfoRequest.isValidType(_infoType)) { throw new IllegalArgumentException("infoType: " + _infoType); } statusCode = _statusCode; infoType = _infoType; data = _data; Loading drm/java/android/drm/DrmRights.java +17 −4 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ public class DrmRights { } mMimeType = mimeType; if (!isValid()) { final String msg = "mimeType: " + mMimeType + "," + "data: " + mData; throw new IllegalArgumentException(msg); } } /** Loading @@ -117,17 +122,25 @@ public class DrmRights { mData = data.getData(); String accountId = data.getAccountId(); if (null != accountId && !accountId.equals("")) { mAccountId = accountId; if (null == accountId || !accountId.equals("")) { throw new IllegalArgumentException("accountId: " + accountId); } mAccountId = accountId; String subscriptionId = data.getSubscriptionId(); if (null != subscriptionId && !subscriptionId.equals("")) { mSubscriptionId = subscriptionId; if (null == subscriptionId || !subscriptionId.equals("")) { throw new IllegalArgumentException( "subscriptionId: " + subscriptionId); } mSubscriptionId = subscriptionId; } mMimeType = mimeType; if (!isValid()) { final String msg = "mimeType: " + mMimeType + "," + "data: " + mData; throw new IllegalArgumentException(msg); } } /** Loading Loading
drm/java/android/drm/DrmInfo.java +14 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ public class DrmInfo { mInfoType = infoType; mMimeType = mimeType; mData = data; if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType + "," + "data: " + data; throw new IllegalArgumentException(msg); } } /** Loading @@ -69,6 +76,13 @@ public class DrmInfo { // call would fail with IllegalArgumentException because of mData = null mData = null; } if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType + "," + "data: " + mData; throw new IllegalArgumentException(); } } /** Loading
drm/java/android/drm/DrmInfoRequest.java +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,11 @@ public class DrmInfoRequest { public DrmInfoRequest(int infoType, String mimeType) { mInfoType = infoType; mMimeType = mimeType; if (!isValid()) { final String msg = "infoType: " + infoType + "," + "mimeType: " + mimeType; throw new IllegalArgumentException(msg); } } /** Loading
drm/java/android/drm/DrmInfoStatus.java +4 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public class DrmInfoStatus { * @param _mimeType The MIME type. */ public DrmInfoStatus(int _statusCode, int _infoType, ProcessedData _data, String _mimeType) { if (!DrmInfoRequest.isValidType(_infoType)) { throw new IllegalArgumentException("infoType: " + _infoType); } statusCode = _statusCode; infoType = _infoType; data = _data; Loading
drm/java/android/drm/DrmRights.java +17 −4 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ public class DrmRights { } mMimeType = mimeType; if (!isValid()) { final String msg = "mimeType: " + mMimeType + "," + "data: " + mData; throw new IllegalArgumentException(msg); } } /** Loading @@ -117,17 +122,25 @@ public class DrmRights { mData = data.getData(); String accountId = data.getAccountId(); if (null != accountId && !accountId.equals("")) { mAccountId = accountId; if (null == accountId || !accountId.equals("")) { throw new IllegalArgumentException("accountId: " + accountId); } mAccountId = accountId; String subscriptionId = data.getSubscriptionId(); if (null != subscriptionId && !subscriptionId.equals("")) { mSubscriptionId = subscriptionId; if (null == subscriptionId || !subscriptionId.equals("")) { throw new IllegalArgumentException( "subscriptionId: " + subscriptionId); } mSubscriptionId = subscriptionId; } mMimeType = mimeType; if (!isValid()) { final String msg = "mimeType: " + mMimeType + "," + "data: " + mData; throw new IllegalArgumentException(msg); } } /** Loading