• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.drm;
18 
19 /**
20  * An entity class that wraps the result of a
21  * {@link DrmManagerClient#processDrmInfo(DrmInfo) processDrmInfo()}
22  * transaction between a device and a DRM server.
23  *
24  * In a license acquisition scenario this class holds the rights information in binary form.
25  *
26  * @deprecated Please use {@link android.media.MediaDrm}
27  */
28 @Deprecated
29 public class ProcessedData {
30     private final byte[] mData;
31     private String mAccountId = "_NO_USER";
32     private String mSubscriptionId = "";
33 
34     /**
35      * Creates a <code>ProcessedData</code> object with the given parameters.
36      *
37      * @param data Rights data.
38      * @param accountId Account ID of the user.
39      */
ProcessedData(byte[] data, String accountId)40     /* package */ ProcessedData(byte[] data, String accountId) {
41         mData = data;
42         mAccountId = accountId;
43     }
44 
45     /**
46      * Creates a <code>ProcessedData</code> object with the given parameters.
47      *
48      * @param data Rights data.
49      * @param accountId Account ID of the user.
50      * @param subscriptionId Subscription ID of the user.
51      */
ProcessedData(byte[] data, String accountId, String subscriptionId)52     /* package */ ProcessedData(byte[] data, String accountId, String subscriptionId) {
53         mData = data;
54         mAccountId = accountId;
55         mSubscriptionId = subscriptionId;
56     }
57 
58     /**
59      * Retrieves the processed data.
60      *
61      * @return The rights data.
62      */
getData()63     public byte[] getData() {
64         return mData;
65     }
66 
67     /**
68      * Retrieves the account ID associated with this object.
69      *
70      * @return The account ID of the user.
71      */
getAccountId()72     public String getAccountId() {
73         return mAccountId;
74     }
75 
76     /**
77      * Returns the subscription ID associated with this object.
78      *
79      * @return The subscription ID of the user.
80      */
getSubscriptionId()81     public String getSubscriptionId() {
82         return mSubscriptionId;
83     }
84 }
85 
86