Fixes for b/4149416:expired license refresh, b/4126624:heartbeats, b/4171055: inconsistent license modes

Also includes b/3500025: A/V resync issues

Change-Id: Ib885d7219d211b188f38e9427bdaecd10fbd7329
This commit is contained in:
Jeffrey Tinker
2011-03-23 23:19:04 -07:00
parent 7458d581cd
commit ba5fa0ef57
13 changed files with 332 additions and 83 deletions

View File

@@ -100,10 +100,32 @@ protected:
ssize_t onPread(int uniqueId, DecryptHandle* decryptHandle,
void* buffer, ssize_t numBytes, off64_t offset);
class Listener {
public:
Listener() : mListener(NULL), mUniqueId(-1) {}
Listener(IDrmEngine::OnInfoListener *listener, int uniqueId)
: mListener(listener), mUniqueId(uniqueId) {};
IDrmEngine::OnInfoListener *GetListener() const {return mListener;}
int GetUniqueId() const {return mUniqueId;}
private:
IDrmEngine::OnInfoListener *mListener;
int mUniqueId;
};
enum MessageType {
MessageType_HeartbeatServer = 4000,
MessageType_HeartbeatPeriod = 4001
};
private:
static void SendEvent(WVDRMPluginAPI::EventType code, const std::string &path);
static IDrmEngine::OnInfoListener *sOnInfoListener;
static int sUniqueId;
static bool SendEvent(WVDRMPluginAPI::EventType code, WVDRMPluginAPI::EventDestination dest,
const std::string &path);
static Vector<Listener> *sNativeListeners;
static Vector<Listener> *sJavaAPIListeners;
WVDRMPluginAPI *mDrmPluginImpl;
};