Status StatsService::getData(const String16& key, vector<uint8_t>* output) {
IPCThreadState* ipc = IPCThreadState::self();
- if (checkCallingPermission(String16(kPermissionDump),
- reinterpret_cast<int32_t*>(ipc->getCallingPid()),
- reinterpret_cast<int32_t*>(ipc->getCallingUid()))) {
+ if (checkCallingPermission(String16(kPermissionDump))) {
// TODO: Implement this.
return Status::ok();
} else {
bool* success) {
IPCThreadState* ipc = IPCThreadState::self();
int32_t* uid = reinterpret_cast<int32_t*>(ipc->getCallingUid());
- if (checkCallingPermission(String16(kPermissionDump),
- reinterpret_cast<int32_t*>(ipc->getCallingPid()), uid)) {
+ if (checkCallingPermission(String16(kPermissionDump))) {
string keyString = string(String8(key).string());
ConfigKey configKey(*uid, keyString);
StatsdConfig cfg;
Status StatsService::removeConfiguration(const String16& key, bool* success) {
IPCThreadState* ipc = IPCThreadState::self();
- if (checkCallingPermission(String16(kPermissionDump),
- reinterpret_cast<int32_t*>(ipc->getCallingPid()),
- reinterpret_cast<int32_t*>(ipc->getCallingUid()))) {
+ if (checkCallingPermission(String16(kPermissionDump))) {
// TODO: Implement this.
return Status::ok();
} else {
// Instead, we'll just make a fake one.
// this should be called from StatsService when it receives a statsd_config
- UpdateConfig(ConfigKey(0, "fake"), build_fake_config());
+ UpdateConfig(ConfigKey(1000, "fake"), build_fake_config());
}
void ConfigManager::AddListener(const sp<ConfigListener>& listener) {