Merge "StatsCompanionService permissions"
diff --git a/services/core/java/com/android/server/stats/StatsCompanionService.java b/services/core/java/com/android/server/stats/StatsCompanionService.java
index 648fa6a..f498cdd 100644
--- a/services/core/java/com/android/server/stats/StatsCompanionService.java
+++ b/services/core/java/com/android/server/stats/StatsCompanionService.java
@@ -161,7 +161,8 @@
@Override
public void sendBroadcast(String pkg, String cls) {
- // TODO: Use a pending intent, and enfoceCallingPermission.
+ // TODO: Use a pending intent.
+ enforceCallingPermission();
mContext.sendBroadcastAsUser(new Intent(ACTION_TRIGGER_COLLECTION).setClassName(pkg, cls),
UserHandle.SYSTEM);
}
@@ -239,7 +240,7 @@
}
}
- public final static class AppUpdateReceiver extends BroadcastReceiver {
+ private final static class AppUpdateReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
/**
@@ -284,7 +285,7 @@
}
}
- public final static class AnomalyAlarmReceiver extends BroadcastReceiver {
+ private final static class AnomalyAlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Slog.i(TAG, "StatsCompanionService believes an anomaly has occurred.");
@@ -304,7 +305,7 @@
}
}
- public final static class PullingAlarmReceiver extends BroadcastReceiver {
+ private final static class PullingAlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (DEBUG)
@@ -325,7 +326,7 @@
}
}
- public final static class ShutdownEventReceiver extends BroadcastReceiver {
+ private final static class ShutdownEventReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
/**