Loading core/java/android/service/ondeviceintelligence/OnDeviceSandboxedInferenceService.java +10 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,16 @@ public abstract class OnDeviceSandboxedInferenceService extends Service { * @hide */ public static final String MODEL_UNLOADED_BUNDLE_KEY = "model_unloaded"; /** * @hide */ public static final String MODEL_LOADED_BROADCAST_INTENT = "android.service.ondeviceintelligence.MODEL_LOADED"; /** * @hide */ public static final String MODEL_UNLOADED_BROADCAST_INTENT = "android.service.ondeviceintelligence.MODEL_UNLOADED"; /** * @hide Loading core/res/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -845,6 +845,8 @@ <protected-broadcast android:name="android.intent.action.MAIN_USER_LOCKSCREEN_KNOWLEDGE_FACTOR_CHANGED" /> <protected-broadcast android:name="com.android.uwb.uwbcountrycode.GEOCODE_RETRY" /> <protected-broadcast android:name="android.telephony.action.ACTION_SATELLITE_SUBSCRIBER_ID_LIST_CHANGED" /> <protected-broadcast android:name="android.service.ondeviceintelligence.MODEL_LOADED" /> <protected-broadcast android:name="android.service.ondeviceintelligence.MODEL_UNLOADED" /> <!-- ====================================================================== --> <!-- RUNTIME PERMISSIONS --> Loading services/core/java/com/android/server/ondeviceintelligence/OnDeviceIntelligenceManagerService.java +4 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.server.ondeviceintelligence; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.DEVICE_CONFIG_UPDATE_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_LOADED_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_UNLOADED_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_LOADED_BROADCAST_INTENT; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_UNLOADED_BROADCAST_INTENT; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.REGISTER_MODEL_UPDATE_CALLBACK_BUNDLE_KEY; import static com.android.server.ondeviceintelligence.BundleUtil.sanitizeInferenceParams; Loading Loading @@ -154,7 +156,7 @@ public class OnDeviceIntelligenceManagerService extends SystemService { @GuardedBy("mLock") private String[] mTemporaryBroadcastKeys; @GuardedBy("mLock") private String mBroadcastPackageName; private String mBroadcastPackageName = SYSTEM_PACKAGE; @GuardedBy("mLock") private String mTemporaryConfigNamespace; Loading Loading @@ -921,10 +923,7 @@ public class OnDeviceIntelligenceManagerService extends SystemService { } } return new String[]{mContext.getResources().getString( R.string.config_onDeviceIntelligenceModelLoadedBroadcastKey), mContext.getResources().getString( R.string.config_onDeviceIntelligenceModelUnloadedBroadcastKey)}; return new String[]{ MODEL_LOADED_BROADCAST_INTENT, MODEL_UNLOADED_BROADCAST_INTENT }; } @RequiresPermission(Manifest.permission.USE_ON_DEVICE_INTELLIGENCE) Loading Loading
core/java/android/service/ondeviceintelligence/OnDeviceSandboxedInferenceService.java +10 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,16 @@ public abstract class OnDeviceSandboxedInferenceService extends Service { * @hide */ public static final String MODEL_UNLOADED_BUNDLE_KEY = "model_unloaded"; /** * @hide */ public static final String MODEL_LOADED_BROADCAST_INTENT = "android.service.ondeviceintelligence.MODEL_LOADED"; /** * @hide */ public static final String MODEL_UNLOADED_BROADCAST_INTENT = "android.service.ondeviceintelligence.MODEL_UNLOADED"; /** * @hide Loading
core/res/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -845,6 +845,8 @@ <protected-broadcast android:name="android.intent.action.MAIN_USER_LOCKSCREEN_KNOWLEDGE_FACTOR_CHANGED" /> <protected-broadcast android:name="com.android.uwb.uwbcountrycode.GEOCODE_RETRY" /> <protected-broadcast android:name="android.telephony.action.ACTION_SATELLITE_SUBSCRIBER_ID_LIST_CHANGED" /> <protected-broadcast android:name="android.service.ondeviceintelligence.MODEL_LOADED" /> <protected-broadcast android:name="android.service.ondeviceintelligence.MODEL_UNLOADED" /> <!-- ====================================================================== --> <!-- RUNTIME PERMISSIONS --> Loading
services/core/java/com/android/server/ondeviceintelligence/OnDeviceIntelligenceManagerService.java +4 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.server.ondeviceintelligence; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.DEVICE_CONFIG_UPDATE_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_LOADED_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_UNLOADED_BUNDLE_KEY; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_LOADED_BROADCAST_INTENT; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.MODEL_UNLOADED_BROADCAST_INTENT; import static android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService.REGISTER_MODEL_UPDATE_CALLBACK_BUNDLE_KEY; import static com.android.server.ondeviceintelligence.BundleUtil.sanitizeInferenceParams; Loading Loading @@ -154,7 +156,7 @@ public class OnDeviceIntelligenceManagerService extends SystemService { @GuardedBy("mLock") private String[] mTemporaryBroadcastKeys; @GuardedBy("mLock") private String mBroadcastPackageName; private String mBroadcastPackageName = SYSTEM_PACKAGE; @GuardedBy("mLock") private String mTemporaryConfigNamespace; Loading Loading @@ -921,10 +923,7 @@ public class OnDeviceIntelligenceManagerService extends SystemService { } } return new String[]{mContext.getResources().getString( R.string.config_onDeviceIntelligenceModelLoadedBroadcastKey), mContext.getResources().getString( R.string.config_onDeviceIntelligenceModelUnloadedBroadcastKey)}; return new String[]{ MODEL_LOADED_BROADCAST_INTENT, MODEL_UNLOADED_BROADCAST_INTENT }; } @RequiresPermission(Manifest.permission.USE_ON_DEVICE_INTELLIGENCE) Loading