Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -6984,4 +6984,7 @@ <!-- Whether WM DisplayContent supports high performance transitions (lower-end devices may want to disable) --> <bool name="config_deviceSupportsHighPerfTransitions">true</bool> <!-- Wear devices: An intent action that is used for remote intent. --> <string name="config_wearRemoteIntentAction" translatable="false" /> </resources> core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -5385,4 +5385,6 @@ <!-- Whether WM DisplayContent supports high performance transitions --> <java-symbol type="bool" name="config_deviceSupportsHighPerfTransitions" /> <java-symbol type="string" name="config_wearRemoteIntentAction" /> </resources> services/core/java/com/android/server/am/ActivityManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -2656,6 +2656,11 @@ public class ActivityManagerService extends IActivityManager.Stub return mBackgroundLaunchBroadcasts; } private String getWearRemoteIntentAction() { return mContext.getResources().getString( com.android.internal.R.string.config_wearRemoteIntentAction); } /** * Ensures that the given package name has an explicit set of allowed associations. * If it does not, give it an empty set. Loading Loading @@ -15213,6 +15218,18 @@ public class ActivityManagerService extends IActivityManager.Stub intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); } // TODO: b/329211459 - Remove this after background remote intent is fixed. if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH) && getWearRemoteIntentAction().equals(action)) { final int callerProcState = callerApp != null ? callerApp.getCurProcState() : ActivityManager.PROCESS_STATE_NONEXISTENT; if (ActivityManager.RunningAppProcessInfo.procStateToImportance(callerProcState) > ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) { return ActivityManager.START_CANCELED; } } switch (action) { case Intent.ACTION_MEDIA_SCANNER_SCAN_FILE: UserManagerInternal umInternal = LocalServices.getService( Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -6984,4 +6984,7 @@ <!-- Whether WM DisplayContent supports high performance transitions (lower-end devices may want to disable) --> <bool name="config_deviceSupportsHighPerfTransitions">true</bool> <!-- Wear devices: An intent action that is used for remote intent. --> <string name="config_wearRemoteIntentAction" translatable="false" /> </resources>
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -5385,4 +5385,6 @@ <!-- Whether WM DisplayContent supports high performance transitions --> <java-symbol type="bool" name="config_deviceSupportsHighPerfTransitions" /> <java-symbol type="string" name="config_wearRemoteIntentAction" /> </resources>
services/core/java/com/android/server/am/ActivityManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -2656,6 +2656,11 @@ public class ActivityManagerService extends IActivityManager.Stub return mBackgroundLaunchBroadcasts; } private String getWearRemoteIntentAction() { return mContext.getResources().getString( com.android.internal.R.string.config_wearRemoteIntentAction); } /** * Ensures that the given package name has an explicit set of allowed associations. * If it does not, give it an empty set. Loading Loading @@ -15213,6 +15218,18 @@ public class ActivityManagerService extends IActivityManager.Stub intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); } // TODO: b/329211459 - Remove this after background remote intent is fixed. if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH) && getWearRemoteIntentAction().equals(action)) { final int callerProcState = callerApp != null ? callerApp.getCurProcState() : ActivityManager.PROCESS_STATE_NONEXISTENT; if (ActivityManager.RunningAppProcessInfo.procStateToImportance(callerProcState) > ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) { return ActivityManager.START_CANCELED; } } switch (action) { case Intent.ACTION_MEDIA_SCANNER_SCAN_FILE: UserManagerInternal umInternal = LocalServices.getService(