Merge "Fix issue #28931042: wtf in system server" into nyc-dev

am: 7a1aa92610

* commit '7a1aa926109b090251d193426ba9fdc699e6f3b7':
  Fix issue #28931042: wtf in system server

Change-Id: Ifc7c884f7fe54f4b4d9d0769c1a0af1b9f6f2e0b
This commit is contained in:
Dianne Hackborn
2016-05-25 00:17:02 +00:00
committed by android-build-merger
2 changed files with 20 additions and 3 deletions

View File

@@ -273,6 +273,9 @@
<protected-broadcast android:name="com.android.server.WifiManager.action.DEVICE_IDLE" /> <protected-broadcast android:name="com.android.server.WifiManager.action.DEVICE_IDLE" />
<protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_ACCEPTED" /> <protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_ACCEPTED" />
<protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_DECLINED" /> <protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_DECLINED" />
<protected-broadcast android:name="com.android.server.usb.ACTION_OPEN_IN_APPS" />
<protected-broadcast android:name="com.android.server.am.DELETE_DUMPHEAP" />
<protected-broadcast android:name="com.android.server.net.action.SNOOZE_WARNING" />
<protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" /> <protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" /> <protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" /> <protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" />
@@ -322,6 +325,9 @@
<protected-broadcast android:name="android.net.proxy.PAC_REFRESH" /> <protected-broadcast android:name="android.net.proxy.PAC_REFRESH" />
<protected-broadcast android:name="android.telecom.action.DEFAULT_DIALER_CHANGED" /> <protected-broadcast android:name="android.telecom.action.DEFAULT_DIALER_CHANGED" />
<protected-broadcast android:name="android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED" />
<protected-broadcast android:name="android.intent.action.CONTENT_CHANGED" />
<protected-broadcast android:name="android.provider.Telephony.MMS_DOWNLOADED" />
<protected-broadcast <protected-broadcast
android:name="com.android.server.connectivityservice.CONNECTED_TO_PROVISIONING_NETWORK_ACTION" /> android:name="com.android.server.connectivityservice.CONNECTED_TO_PROVISIONING_NETWORK_ACTION" />
@@ -384,6 +390,7 @@
<protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_REMOVED" /> <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_REMOVED" />
<protected-broadcast android:name="android.bluetooth.adapter.action.BLE_STATE_CHANGED" /> <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_STATE_CHANGED" />
<protected-broadcast android:name="com.android.bluetooth.map.USER_CONFIRM_TIMEOUT" />
<protected-broadcast android:name="android.content.jobscheduler.JOB_DELAY_EXPIRED" /> <protected-broadcast android:name="android.content.jobscheduler.JOB_DELAY_EXPIRED" />
<protected-broadcast android:name="android.content.syncmanager.SYNC_ALARM" /> <protected-broadcast android:name="android.content.syncmanager.SYNC_ALARM" />
<protected-broadcast android:name="android.media.INTERNAL_RINGER_MODE_CHANGED_ACTION" /> <protected-broadcast android:name="android.media.INTERNAL_RINGER_MODE_CHANGED_ACTION" />

View File

@@ -201,6 +201,7 @@ import android.service.voice.VoiceInteractionManagerInternal;
import android.service.voice.VoiceInteractionSession; import android.service.voice.VoiceInteractionSession;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.text.format.Time; import android.text.format.Time;
import android.text.style.SuggestionSpan;
import android.util.ArrayMap; import android.util.ArrayMap;
import android.util.ArraySet; import android.util.ArraySet;
import android.util.AtomicFile; import android.util.AtomicFile;
@@ -17397,15 +17398,24 @@ public final class ActivityManagerService extends ActivityManagerNative
|| AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action)
|| AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)
|| LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action) || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action)
|| TelephonyIntents.ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE.equals(action)) { || TelephonyIntents.ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE.equals(action)
|| SuggestionSpan.ACTION_SUGGESTION_PICKED.equals(action)) {
// Broadcast is either protected, or it's a public action that // Broadcast is either protected, or it's a public action that
// we've relaxed, so it's fine for system internals to send. // we've relaxed, so it's fine for system internals to send.
} else { } else {
// The vast majority of broadcasts sent from system internals // The vast majority of broadcasts sent from system internals
// should be protected to avoid security holes, so yell loudly // should be protected to avoid security holes, so yell loudly
// to ensure we examine these cases. // to ensure we examine these cases.
Log.wtf(TAG, "Sending non-protected broadcast " + action if (callerApp != null) {
+ " from system", new Throwable()); Log.wtf(TAG, "Sending non-protected broadcast " + action
+ " from system " + callerApp.toShortString() + " pkg " + callerPackage,
new Throwable());
} else {
Log.wtf(TAG, "Sending non-protected broadcast " + action
+ " from system uid " + UserHandle.formatUid(callingUid)
+ " pkg " + callerPackage,
new Throwable());
}
} }
} else { } else {