blob: eacafddd4b746de048326ee088d9c8361cee9d7f [file] [log] [blame]
Ray Essick3938dc62016-11-01 08:56:56 -07001/*
2 * Copyright (C) 2016 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// Proxy for media player implementations
18
19//#define LOG_NDEBUG 0
20#define LOG_TAG "MediaAnalyticsService"
21#include <utils/Log.h>
22
23#include <inttypes.h>
24#include <sys/types.h>
25#include <sys/stat.h>
26#include <sys/time.h>
27#include <dirent.h>
28#include <unistd.h>
29
30#include <string.h>
31
32#include <cutils/atomic.h>
33#include <cutils/properties.h> // for property_get
34
35#include <utils/misc.h>
36
37#include <binder/IPCThreadState.h>
38#include <binder/IServiceManager.h>
39#include <binder/MemoryHeapBase.h>
40#include <binder/MemoryBase.h>
41#include <gui/Surface.h>
42#include <utils/Errors.h> // for status_t
43#include <utils/List.h>
44#include <utils/String8.h>
45#include <utils/SystemClock.h>
46#include <utils/Timers.h>
47#include <utils/Vector.h>
48
49#include <media/AudioPolicyHelper.h>
50#include <media/IMediaHTTPService.h>
51#include <media/IRemoteDisplay.h>
52#include <media/IRemoteDisplayClient.h>
53#include <media/MediaPlayerInterface.h>
54#include <media/mediarecorder.h>
55#include <media/MediaMetadataRetrieverInterface.h>
56#include <media/Metadata.h>
57#include <media/AudioTrack.h>
58#include <media/MemoryLeakTrackUtil.h>
59#include <media/stagefright/MediaCodecList.h>
60#include <media/stagefright/MediaErrors.h>
61#include <media/stagefright/Utils.h>
62#include <media/stagefright/foundation/ADebug.h>
63#include <media/stagefright/foundation/ALooperRoster.h>
64#include <mediautils/BatteryNotifier.h>
65
66//#include <memunreachable/memunreachable.h>
67#include <system/audio.h>
68
69#include <private/android_filesystem_config.h>
70
71#include "MediaAnalyticsService.h"
72
73
74namespace android {
75
76
Ray Essickb5fac8e2016-12-12 11:33:56 -080077#define DEBUG_QUEUE 0
Ray Essick3938dc62016-11-01 08:56:56 -070078
79//using android::status_t;
80//using android::OK;
81//using android::BAD_VALUE;
82//using android::NOT_ENOUGH_DATA;
83//using android::Parcel;
84
85
86void MediaAnalyticsService::instantiate() {
87 defaultServiceManager()->addService(
Ray Essickd38e1742017-01-23 15:17:06 -080088 String16("media.metrics"), new MediaAnalyticsService());
Ray Essick3938dc62016-11-01 08:56:56 -070089}
90
91// XXX: add dynamic controls for mMaxRecords
92MediaAnalyticsService::MediaAnalyticsService()
93 : mMaxRecords(100) {
94
95 ALOGD("MediaAnalyticsService created");
96 // clear our queues
Ray Essickb5fac8e2016-12-12 11:33:56 -080097 mOpen = new List<MediaAnalyticsItem *>();
98 mFinalized = new List<MediaAnalyticsItem *>();
Ray Essick3938dc62016-11-01 08:56:56 -070099
100 mItemsSubmitted = 0;
101 mItemsFinalized = 0;
102 mItemsDiscarded = 0;
103
104 mLastSessionID = 0;
105 // recover any persistency we set up
106 // etc
107}
108
109MediaAnalyticsService::~MediaAnalyticsService() {
110 ALOGD("MediaAnalyticsService destroyed");
111
112 // XXX: clean out mOpen and mFinalized
113}
114
115
116MediaAnalyticsItem::SessionID_t MediaAnalyticsService::generateUniqueSessionID() {
117 // generate a new sessionid
118
119 Mutex::Autolock _l(mLock_ids);
120 return (++mLastSessionID);
121}
122
Ray Essickb5fac8e2016-12-12 11:33:56 -0800123// caller surrenders ownership of 'item'
124MediaAnalyticsItem::SessionID_t MediaAnalyticsService::submit(MediaAnalyticsItem *item, bool forcenew) {
Ray Essick3938dc62016-11-01 08:56:56 -0700125
126 MediaAnalyticsItem::SessionID_t id = MediaAnalyticsItem::SessionIDInvalid;
127
Ray Essickd38e1742017-01-23 15:17:06 -0800128 // we control these, generally not trusting user input
Ray Essick3938dc62016-11-01 08:56:56 -0700129 nsecs_t now = systemTime(SYSTEM_TIME_REALTIME);
130 item->setTimestamp(now);
131 int pid = IPCThreadState::self()->getCallingPid();
Ray Essick3938dc62016-11-01 08:56:56 -0700132 int uid = IPCThreadState::self()->getCallingUid();
Ray Essickd38e1742017-01-23 15:17:06 -0800133
134 int uid_given = item->getUid();
135 int pid_given = item->getPid();
136
137 // although we do make exceptions for particular client uids
138 // that we know we trust.
139 //
140 bool isTrusted = false;
141
142 switch (uid) {
143 case AID_MEDIA:
144 case AID_MEDIA_CODEC:
145 case AID_MEDIA_EX:
146 case AID_MEDIA_DRM:
147 // trusted source, only override default values
148 isTrusted = true;
149 if (uid_given == (-1)) {
150 item->setUid(uid);
151 }
152 if (pid_given == (-1)) {
153 item->setPid(pid);
154 }
155 break;
156 default:
157 isTrusted = false;
158 item->setPid(pid);
159 item->setUid(uid);
160 break;
161 }
162
Ray Essick3938dc62016-11-01 08:56:56 -0700163
164 mItemsSubmitted++;
165
166 // validate the record; we discard if we don't like it
Ray Essickd38e1742017-01-23 15:17:06 -0800167 if (contentValid(item, isTrusted) == false) {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800168 delete item;
Ray Essick3938dc62016-11-01 08:56:56 -0700169 return MediaAnalyticsItem::SessionIDInvalid;
170 }
171
172
173 // if we have a sesisonid in the new record, look to make
174 // sure it doesn't appear in the finalized list.
175 // XXX: this is for security / DOS prevention.
176 // may also require that we persist the unique sessionIDs
177 // across boots [instead of within a single boot]
178
179
180 // match this new record up against records in the open
181 // list...
182 // if there's a match, merge them together
183 // deal with moving the old / merged record into the finalized que
184
185 bool finalizing = item->getFinalized();
186
187 // if finalizing, we'll remove it
Ray Essickb5fac8e2016-12-12 11:33:56 -0800188 MediaAnalyticsItem *oitem = findItem(mOpen, item, finalizing | forcenew);
Ray Essick3938dc62016-11-01 08:56:56 -0700189 if (oitem != NULL) {
190 if (forcenew) {
191 // old one gets finalized, then we insert the new one
192 // so we'll have 2 records at the end of this.
193 // but don't finalize an empty record
Ray Essickb5fac8e2016-12-12 11:33:56 -0800194 if (oitem->count() == 0) {
195 // we're responsible for disposing of the dead record
196 delete oitem;
197 oitem = NULL;
198 } else {
Ray Essick3938dc62016-11-01 08:56:56 -0700199 oitem->setFinalized(true);
200 saveItem(mFinalized, oitem, 0);
201 }
202 // new record could itself be marked finalized...
203 if (finalizing) {
204 saveItem(mFinalized, item, 0);
205 mItemsFinalized++;
206 } else {
207 saveItem(mOpen, item, 1);
208 }
209 id = item->getSessionID();
210 } else {
211 // combine the records, send it to finalized if appropriate
212 oitem->merge(item);
213 if (finalizing) {
214 saveItem(mFinalized, oitem, 0);
215 mItemsFinalized++;
216 }
217 id = oitem->getSessionID();
Ray Essickb5fac8e2016-12-12 11:33:56 -0800218
219 // we're responsible for disposing of the dead record
220 delete item;
221 item = NULL;
Ray Essick3938dc62016-11-01 08:56:56 -0700222 }
223 } else {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800224 // nothing to merge, save the new record
225 id = item->getSessionID();
226 if (finalizing) {
227 if (item->count() == 0) {
228 // drop empty records
229 delete item;
230 item = NULL;
Ray Essick3938dc62016-11-01 08:56:56 -0700231 } else {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800232 saveItem(mFinalized, item, 0);
233 mItemsFinalized++;
Ray Essick3938dc62016-11-01 08:56:56 -0700234 }
Ray Essickb5fac8e2016-12-12 11:33:56 -0800235 } else {
236 saveItem(mOpen, item, 1);
237 }
Ray Essick3938dc62016-11-01 08:56:56 -0700238 }
Ray Essick3938dc62016-11-01 08:56:56 -0700239 return id;
240}
241
Ray Essickb5fac8e2016-12-12 11:33:56 -0800242List<MediaAnalyticsItem *> *MediaAnalyticsService::getMediaAnalyticsItemList(bool finished, nsecs_t ts) {
Ray Essick3938dc62016-11-01 08:56:56 -0700243 // this might never get called; the binder interface maps to the full parm list
244 // on the client side before making the binder call.
245 // but this lets us be sure...
Ray Essickb5fac8e2016-12-12 11:33:56 -0800246 List<MediaAnalyticsItem*> *list;
Ray Essick3938dc62016-11-01 08:56:56 -0700247 list = getMediaAnalyticsItemList(finished, ts, MediaAnalyticsItem::kKeyAny);
248 return list;
249}
250
Ray Essickb5fac8e2016-12-12 11:33:56 -0800251List<MediaAnalyticsItem *> *MediaAnalyticsService::getMediaAnalyticsItemList(bool , nsecs_t , MediaAnalyticsItem::Key ) {
Ray Essick3938dc62016-11-01 08:56:56 -0700252
253 // XXX: implement the get-item-list semantics
254
Ray Essickb5fac8e2016-12-12 11:33:56 -0800255 List<MediaAnalyticsItem *> *list = NULL;
Ray Essick3938dc62016-11-01 08:56:56 -0700256 // set up our query on the persistent data
257 // slurp in all of the pieces
258 // return that
259 return list;
260}
261
Ray Essickb5fac8e2016-12-12 11:33:56 -0800262status_t MediaAnalyticsService::dump(int fd, const Vector<String16>& args)
Ray Essick3938dc62016-11-01 08:56:56 -0700263{
Ray Essickb5fac8e2016-12-12 11:33:56 -0800264 const size_t SIZE = 512;
Ray Essick3938dc62016-11-01 08:56:56 -0700265 char buffer[SIZE];
266 String8 result;
267
268 if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
269 snprintf(buffer, SIZE, "Permission Denial: "
270 "can't dump MediaAnalyticsService from pid=%d, uid=%d\n",
271 IPCThreadState::self()->getCallingPid(),
272 IPCThreadState::self()->getCallingUid());
273 result.append(buffer);
Ray Essickb5fac8e2016-12-12 11:33:56 -0800274 write(fd, result.string(), result.size());
275 return NO_ERROR;
Ray Essick3938dc62016-11-01 08:56:56 -0700276 }
Ray Essickb5fac8e2016-12-12 11:33:56 -0800277
278 // crack any parameters
279 bool clear = false;
280 nsecs_t ts_since = 0;
281 String16 clearOption("-clear");
282 String16 sinceOption("-since");
283 int n = args.size();
284 for (int i = 0; i < n; i++) {
285 String8 myarg(args[i]);
286 if (args[i] == clearOption) {
287 clear = true;
288 } else if (args[i] == sinceOption) {
289 i++;
290 if (i < n) {
291 String8 value(args[i]);
292 char *endp;
293 const char *p = value.string();
294 ts_since = strtoll(p, &endp, 10);
295 if (endp == p || *endp != '\0') {
296 ts_since = 0;
297 }
298 } else {
299 ts_since = 0;
300 }
301 }
302 }
303
304 Mutex::Autolock _l(mLock);
305
Ray Essickd38e1742017-01-23 15:17:06 -0800306 snprintf(buffer, SIZE, "Dump of the mediametrics process:\n");
Ray Essickb5fac8e2016-12-12 11:33:56 -0800307 result.append(buffer);
308
309 int enabled = MediaAnalyticsItem::isEnabled();
310 if (enabled) {
Ray Essickd38e1742017-01-23 15:17:06 -0800311 snprintf(buffer, SIZE, "Metrics gathering: enabled\n");
Ray Essickb5fac8e2016-12-12 11:33:56 -0800312 } else {
Ray Essickd38e1742017-01-23 15:17:06 -0800313 snprintf(buffer, SIZE, "Metrics gathering: DISABLED via property\n");
Ray Essickb5fac8e2016-12-12 11:33:56 -0800314 }
315 result.append(buffer);
316
317 snprintf(buffer, SIZE,
318 "Since Boot: Submissions: %" PRId64
319 " Finalizations: %" PRId64
320 " Discarded: %" PRId64 "\n",
321 mItemsSubmitted, mItemsFinalized, mItemsDiscarded);
322 result.append(buffer);
323 if (ts_since != 0) {
324 snprintf(buffer, SIZE,
325 "Dumping Queue entries more recent than: %" PRId64 "\n",
326 (int64_t) ts_since);
327 result.append(buffer);
328 }
329
330 // show the recently recorded records
Ray Essickd38e1742017-01-23 15:17:06 -0800331 snprintf(buffer, sizeof(buffer), "\nFinalized Metrics (oldest first):\n");
Ray Essickb5fac8e2016-12-12 11:33:56 -0800332 result.append(buffer);
333 result.append(this->dumpQueue(mFinalized, ts_since));
334
Ray Essickd38e1742017-01-23 15:17:06 -0800335 snprintf(buffer, sizeof(buffer), "\nIn-Progress Metrics (newest first):\n");
Ray Essickb5fac8e2016-12-12 11:33:56 -0800336 result.append(buffer);
337 result.append(this->dumpQueue(mOpen, ts_since));
338
339 // show who is connected and injecting records?
340 // talk about # records fed to the 'readers'
341 // talk about # records we discarded, perhaps "discarded w/o reading" too
342
343 if (clear) {
344 // remove everything from the finalized queue
345 while (mFinalized->size() > 0) {
346 MediaAnalyticsItem * oitem = *(mFinalized->begin());
347 if (DEBUG_QUEUE) {
348 ALOGD("zap old record: key %s sessionID %" PRId64 " ts %" PRId64 "",
349 oitem->getKey().c_str(), oitem->getSessionID(),
350 oitem->getTimestamp());
351 }
352 mFinalized->erase(mFinalized->begin());
353 mItemsDiscarded++;
354 }
355 }
356
Ray Essick3938dc62016-11-01 08:56:56 -0700357 write(fd, result.string(), result.size());
358 return NO_ERROR;
359}
360
361// caller has locked mLock...
Ray Essickb5fac8e2016-12-12 11:33:56 -0800362String8 MediaAnalyticsService::dumpQueue(List<MediaAnalyticsItem *> *theList) {
363 return dumpQueue(theList, (nsecs_t) 0);
364}
365
366String8 MediaAnalyticsService::dumpQueue(List<MediaAnalyticsItem *> *theList, nsecs_t ts_since) {
367 const size_t SIZE = 512;
Ray Essick3938dc62016-11-01 08:56:56 -0700368 char buffer[SIZE];
369 String8 result;
370 int slot = 0;
371
372 if (theList->empty()) {
373 result.append("empty\n");
374 } else {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800375 List<MediaAnalyticsItem *>::iterator it = theList->begin();
376 for (; it != theList->end(); it++) {
377 nsecs_t when = (*it)->getTimestamp();
378 if (when < ts_since) {
379 continue;
380 }
Ray Essick3938dc62016-11-01 08:56:56 -0700381 AString entry = (*it)->toString();
Ray Essickb5fac8e2016-12-12 11:33:56 -0800382 snprintf(buffer, sizeof(buffer), "%4d: %s",
Ray Essick3938dc62016-11-01 08:56:56 -0700383 slot, entry.c_str());
384 result.append(buffer);
Ray Essickb5fac8e2016-12-12 11:33:56 -0800385 buffer[0] = '\n';
386 buffer[1] = '\0';
387 result.append(buffer);
388 slot++;
Ray Essick3938dc62016-11-01 08:56:56 -0700389 }
390 }
391
392 return result;
393}
394
395//
396// Our Cheap in-core, non-persistent records management.
397// XXX: rewrite this to manage persistence, etc.
398
399// insert appropriately into queue
Ray Essickb5fac8e2016-12-12 11:33:56 -0800400void MediaAnalyticsService::saveItem(List<MediaAnalyticsItem *> *l, MediaAnalyticsItem * item, int front) {
Ray Essick3938dc62016-11-01 08:56:56 -0700401
402 Mutex::Autolock _l(mLock);
403
Ray Essickb5fac8e2016-12-12 11:33:56 -0800404 if (DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700405 ALOGD("Inject a record: session %" PRId64 " ts %" PRId64 "",
406 item->getSessionID(), item->getTimestamp());
Ray Essick3938dc62016-11-01 08:56:56 -0700407 String8 before = dumpQueue(l);
408 ALOGD("Q before insert: %s", before.string());
409 }
410
411 // adding at back of queue (fifo order)
412 if (front) {
413 l->push_front(item);
414 } else {
415 l->push_back(item);
416 }
417
Ray Essickb5fac8e2016-12-12 11:33:56 -0800418 if (DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700419 String8 after = dumpQueue(l);
420 ALOGD("Q after insert: %s", after.string());
421 }
422
423 // keep removing old records the front until we're in-bounds
424 if (mMaxRecords > 0) {
425 while (l->size() > (size_t) mMaxRecords) {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800426 MediaAnalyticsItem * oitem = *(l->begin());
427 if (DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700428 ALOGD("zap old record: key %s sessionID %" PRId64 " ts %" PRId64 "",
429 oitem->getKey().c_str(), oitem->getSessionID(),
430 oitem->getTimestamp());
431 }
432 l->erase(l->begin());
Ray Essickb5fac8e2016-12-12 11:33:56 -0800433 delete oitem;
Ray Essickb5fac8e2016-12-12 11:33:56 -0800434 mItemsDiscarded++;
Ray Essick3938dc62016-11-01 08:56:56 -0700435 }
436 }
437
Ray Essickb5fac8e2016-12-12 11:33:56 -0800438 if (DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700439 String8 after = dumpQueue(l);
440 ALOGD("Q after cleanup: %s", after.string());
441 }
442}
443
444// are they alike enough that nitem can be folded into oitem?
Ray Essickb5fac8e2016-12-12 11:33:56 -0800445static bool compatibleItems(MediaAnalyticsItem * oitem, MediaAnalyticsItem * nitem) {
Ray Essick3938dc62016-11-01 08:56:56 -0700446
447 if (0) {
448 ALOGD("Compare: o %s n %s",
449 oitem->toString().c_str(), nitem->toString().c_str());
450 }
451
452 // general safety
453 if (nitem->getUid() != oitem->getUid()) {
454 return false;
455 }
456 if (nitem->getPid() != oitem->getPid()) {
457 return false;
458 }
459
460 // key -- needs to match
461 if (nitem->getKey() == oitem->getKey()) {
462 // still in the game.
463 } else {
464 return false;
465 }
466
467 // session id -- empty field in new is allowed
468 MediaAnalyticsItem::SessionID_t osession = oitem->getSessionID();
469 MediaAnalyticsItem::SessionID_t nsession = nitem->getSessionID();
470 if (nsession != osession) {
471 // incoming '0' matches value in osession
472 if (nsession != 0) {
473 return false;
474 }
475 }
476
477 return true;
478}
479
480// find the incomplete record that this will overlay
Ray Essickb5fac8e2016-12-12 11:33:56 -0800481MediaAnalyticsItem *MediaAnalyticsService::findItem(List<MediaAnalyticsItem*> *theList, MediaAnalyticsItem *nitem, bool removeit) {
Ray Essick3938dc62016-11-01 08:56:56 -0700482 if (nitem == NULL) {
483 return NULL;
484 }
485
Ray Essickb5fac8e2016-12-12 11:33:56 -0800486 MediaAnalyticsItem *item = NULL;
487
Ray Essick3938dc62016-11-01 08:56:56 -0700488 Mutex::Autolock _l(mLock);
489
Ray Essickb5fac8e2016-12-12 11:33:56 -0800490 for (List<MediaAnalyticsItem *>::iterator it = theList->begin();
Ray Essick3938dc62016-11-01 08:56:56 -0700491 it != theList->end(); it++) {
Ray Essickb5fac8e2016-12-12 11:33:56 -0800492 MediaAnalyticsItem *tmp = (*it);
Ray Essick3938dc62016-11-01 08:56:56 -0700493
494 if (!compatibleItems(tmp, nitem)) {
495 continue;
496 }
497
498 // we match! this is the one I want.
499 if (removeit) {
500 theList->erase(it);
501 }
502 item = tmp;
503 break;
504 }
505 return item;
506}
507
508
509// delete the indicated record
Ray Essickb5fac8e2016-12-12 11:33:56 -0800510void MediaAnalyticsService::deleteItem(List<MediaAnalyticsItem *> *l, MediaAnalyticsItem *item) {
Ray Essick3938dc62016-11-01 08:56:56 -0700511
512 Mutex::Autolock _l(mLock);
513
Ray Essickb5fac8e2016-12-12 11:33:56 -0800514 if(DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700515 String8 before = dumpQueue(l);
516 ALOGD("Q before delete: %s", before.string());
517 }
518
Ray Essickb5fac8e2016-12-12 11:33:56 -0800519 for (List<MediaAnalyticsItem *>::iterator it = l->begin();
Ray Essick3938dc62016-11-01 08:56:56 -0700520 it != l->end(); it++) {
521 if ((*it)->getSessionID() != item->getSessionID())
522 continue;
523
Ray Essickb5fac8e2016-12-12 11:33:56 -0800524 if (DEBUG_QUEUE) {
525 ALOGD(" --- removing record for SessionID %" PRId64 "", item->getSessionID());
526 ALOGD("drop record at %s:%d", __FILE__, __LINE__);
527 }
528 delete *it;
Ray Essick3938dc62016-11-01 08:56:56 -0700529 l->erase(it);
530 break;
531 }
532
Ray Essickb5fac8e2016-12-12 11:33:56 -0800533 if (DEBUG_QUEUE) {
Ray Essick3938dc62016-11-01 08:56:56 -0700534 String8 after = dumpQueue(l);
535 ALOGD("Q after delete: %s", after.string());
536 }
537}
538
Ray Essickd38e1742017-01-23 15:17:06 -0800539static AString allowedKeys[] =
540{
541 "codec",
542 "extractor"
543};
Ray Essick3938dc62016-11-01 08:56:56 -0700544
Ray Essickd38e1742017-01-23 15:17:06 -0800545static const int nAllowedKeys = sizeof(allowedKeys) / sizeof(allowedKeys[0]);
546
547// are the contents good
548bool MediaAnalyticsService::contentValid(MediaAnalyticsItem *item, bool isTrusted) {
549
550 // untrusted uids can only send us a limited set of keys
551 if (isTrusted == false) {
552 // restrict to a specific set of keys
553 AString key = item->getKey();
554
555 size_t i;
556 for(i = 0; i < nAllowedKeys; i++) {
557 if (key == allowedKeys[i]) {
558 break;
559 }
560 }
561 if (i == nAllowedKeys) {
562 ALOGD("Ignoring (key): %s", item->toString().c_str());
563 return false;
564 }
565 }
566
Ray Essick3938dc62016-11-01 08:56:56 -0700567 // internal consistency
568
569 return true;
570}
571
572// are we rate limited, normally false
Ray Essickb5fac8e2016-12-12 11:33:56 -0800573bool MediaAnalyticsService::rateLimited(MediaAnalyticsItem *) {
Ray Essick3938dc62016-11-01 08:56:56 -0700574
575 return false;
576}
577
578
579} // namespace android