Loading core/java/android/app/SystemServiceRegistry.java +3 −15 Original line number Diff line number Diff line Loading @@ -141,9 +141,6 @@ import java.util.HashMap; final class SystemServiceRegistry { private static final String TAG = "SystemServiceRegistry"; // When set, include stack traces when services aren't published private static final boolean DEBUG_EARLY_CALLERS = true; // Service registry information. // This information is never changed once static initialization has completed. private static final HashMap<Class<?>, String> SYSTEM_SERVICE_NAMES = Loading Loading @@ -385,9 +382,6 @@ final class SystemServiceRegistry { public PowerManager createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.POWER_SERVICE); IPowerManager service = IPowerManager.Stub.asInterface(b); if (service == null) { Log.wtf(TAG, "Failed to get power manager service."); } return new PowerManager(ctx.getOuterContext(), service, ctx.mMainThread.getHandler()); }}); Loading @@ -398,9 +392,6 @@ final class SystemServiceRegistry { public RecoverySystem createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.RECOVERY_SERVICE); IRecoverySystem service = IRecoverySystem.Stub.asInterface(b); if (service == null) { Log.wtf(TAG, "Failed to get recovery service."); } return new RecoverySystem(service); }}); Loading Loading @@ -525,9 +516,6 @@ final class SystemServiceRegistry { public WifiNanManager createService() throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.WIFI_NAN_SERVICE); IWifiNanManager service = IWifiNanManager.Stub.asInterface(b); if (service == null) { return null; } return new WifiNanManager(service); }}); Loading Loading @@ -840,7 +828,7 @@ final class SystemServiceRegistry { service = createService(ctx); cache[mCacheIndex] = service; } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return (T)service; Loading @@ -864,7 +852,7 @@ final class SystemServiceRegistry { try { mCachedInstance = createService(); } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return mCachedInstance; Loading Loading @@ -897,7 +885,7 @@ final class SystemServiceRegistry { try { mCachedInstance = createService(appContext != null ? appContext : ctx); } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return mCachedInstance; Loading services/appwidget/java/com/android/server/appwidget/AppWidgetService.java +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public class AppWidgetService extends SystemService { @Override public void onStart() { mImpl.onStart(); publishBinderService(Context.APPWIDGET_SERVICE, mImpl); AppWidgetBackupBridge.register(mImpl); } Loading services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +15 −12 Original line number Diff line number Diff line Loading @@ -201,21 +201,21 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private final SparseArray<ArraySet<String>> mWidgetPackages = new SparseArray<>(); private final BackupRestoreController mBackupRestoreController; private BackupRestoreController mBackupRestoreController; private final Context mContext; private final IPackageManager mPackageManager; private final AlarmManager mAlarmManager; private final UserManager mUserManager; private final AppOpsManager mAppOpsManager; private final KeyguardManager mKeyguardManager; private final DevicePolicyManagerInternal mDevicePolicyManagerInternal; private IPackageManager mPackageManager; private AlarmManager mAlarmManager; private UserManager mUserManager; private AppOpsManager mAppOpsManager; private KeyguardManager mKeyguardManager; private DevicePolicyManagerInternal mDevicePolicyManagerInternal; private final SecurityPolicy mSecurityPolicy; private SecurityPolicy mSecurityPolicy; private final Handler mSaveStateHandler; private final Handler mCallbackHandler; private Handler mSaveStateHandler; private Handler mCallbackHandler; private Locale mLocale; Loading @@ -224,10 +224,13 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private boolean mSafeMode; private int mMaxWidgetBitmapMemory; private final IconUtilities mIconUtilities; private IconUtilities mIconUtilities; AppWidgetServiceImpl(Context context) { mContext = context; } public void onStart() { mPackageManager = AppGlobals.getPackageManager(); mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); Loading @@ -238,7 +241,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku mCallbackHandler = new CallbackHandler(mContext.getMainLooper()); mBackupRestoreController = new BackupRestoreController(); mSecurityPolicy = new SecurityPolicy(); mIconUtilities = new IconUtilities(context); mIconUtilities = new IconUtilities(mContext); computeMaximumWidgetBitmapMemory(); registerBroadcastReceiver(); Loading services/core/java/com/android/server/audio/AudioService.java +2 −3 Original line number Diff line number Diff line Loading @@ -746,9 +746,8 @@ public class AudioService extends IAudioService.Stub { BluetoothProfile.A2DP); } mHdmiManager = (HdmiControlManager) mContext.getSystemService(Context.HDMI_CONTROL_SERVICE); if (mHdmiManager != null) { if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_HDMI_CEC)) { mHdmiManager = mContext.getSystemService(HdmiControlManager.class); synchronized (mHdmiManager) { mHdmiTvClient = mHdmiManager.getTvClient(); if (mHdmiTvClient != null) { Loading services/java/com/android/server/SystemServer.java +4 −4 Original line number Diff line number Diff line Loading @@ -1011,6 +1011,10 @@ public final class SystemServer { mSystemServiceManager.startService(SoundTriggerService.class); if (!disableNonCoreServices) { if (!disableTrustManager) { mSystemServiceManager.startService(TrustManagerService.class); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_BACKUP)) { mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS); } Loading Loading @@ -1140,10 +1144,6 @@ public final class SystemServer { } Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER); if (!disableTrustManager) { mSystemServiceManager.startService(TrustManagerService.class); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) { mSystemServiceManager.startService(FingerprintService.class); } Loading Loading
core/java/android/app/SystemServiceRegistry.java +3 −15 Original line number Diff line number Diff line Loading @@ -141,9 +141,6 @@ import java.util.HashMap; final class SystemServiceRegistry { private static final String TAG = "SystemServiceRegistry"; // When set, include stack traces when services aren't published private static final boolean DEBUG_EARLY_CALLERS = true; // Service registry information. // This information is never changed once static initialization has completed. private static final HashMap<Class<?>, String> SYSTEM_SERVICE_NAMES = Loading Loading @@ -385,9 +382,6 @@ final class SystemServiceRegistry { public PowerManager createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.POWER_SERVICE); IPowerManager service = IPowerManager.Stub.asInterface(b); if (service == null) { Log.wtf(TAG, "Failed to get power manager service."); } return new PowerManager(ctx.getOuterContext(), service, ctx.mMainThread.getHandler()); }}); Loading @@ -398,9 +392,6 @@ final class SystemServiceRegistry { public RecoverySystem createService(ContextImpl ctx) throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.RECOVERY_SERVICE); IRecoverySystem service = IRecoverySystem.Stub.asInterface(b); if (service == null) { Log.wtf(TAG, "Failed to get recovery service."); } return new RecoverySystem(service); }}); Loading Loading @@ -525,9 +516,6 @@ final class SystemServiceRegistry { public WifiNanManager createService() throws ServiceNotFoundException { IBinder b = ServiceManager.getServiceOrThrow(Context.WIFI_NAN_SERVICE); IWifiNanManager service = IWifiNanManager.Stub.asInterface(b); if (service == null) { return null; } return new WifiNanManager(service); }}); Loading Loading @@ -840,7 +828,7 @@ final class SystemServiceRegistry { service = createService(ctx); cache[mCacheIndex] = service; } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return (T)service; Loading @@ -864,7 +852,7 @@ final class SystemServiceRegistry { try { mCachedInstance = createService(); } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return mCachedInstance; Loading Loading @@ -897,7 +885,7 @@ final class SystemServiceRegistry { try { mCachedInstance = createService(appContext != null ? appContext : ctx); } catch (ServiceNotFoundException e) { Log.w(TAG, e.getMessage(), DEBUG_EARLY_CALLERS ? e : null); Log.wtf(TAG, e.getMessage(), e); } } return mCachedInstance; Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetService.java +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public class AppWidgetService extends SystemService { @Override public void onStart() { mImpl.onStart(); publishBinderService(Context.APPWIDGET_SERVICE, mImpl); AppWidgetBackupBridge.register(mImpl); } Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +15 −12 Original line number Diff line number Diff line Loading @@ -201,21 +201,21 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private final SparseArray<ArraySet<String>> mWidgetPackages = new SparseArray<>(); private final BackupRestoreController mBackupRestoreController; private BackupRestoreController mBackupRestoreController; private final Context mContext; private final IPackageManager mPackageManager; private final AlarmManager mAlarmManager; private final UserManager mUserManager; private final AppOpsManager mAppOpsManager; private final KeyguardManager mKeyguardManager; private final DevicePolicyManagerInternal mDevicePolicyManagerInternal; private IPackageManager mPackageManager; private AlarmManager mAlarmManager; private UserManager mUserManager; private AppOpsManager mAppOpsManager; private KeyguardManager mKeyguardManager; private DevicePolicyManagerInternal mDevicePolicyManagerInternal; private final SecurityPolicy mSecurityPolicy; private SecurityPolicy mSecurityPolicy; private final Handler mSaveStateHandler; private final Handler mCallbackHandler; private Handler mSaveStateHandler; private Handler mCallbackHandler; private Locale mLocale; Loading @@ -224,10 +224,13 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private boolean mSafeMode; private int mMaxWidgetBitmapMemory; private final IconUtilities mIconUtilities; private IconUtilities mIconUtilities; AppWidgetServiceImpl(Context context) { mContext = context; } public void onStart() { mPackageManager = AppGlobals.getPackageManager(); mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); Loading @@ -238,7 +241,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku mCallbackHandler = new CallbackHandler(mContext.getMainLooper()); mBackupRestoreController = new BackupRestoreController(); mSecurityPolicy = new SecurityPolicy(); mIconUtilities = new IconUtilities(context); mIconUtilities = new IconUtilities(mContext); computeMaximumWidgetBitmapMemory(); registerBroadcastReceiver(); Loading
services/core/java/com/android/server/audio/AudioService.java +2 −3 Original line number Diff line number Diff line Loading @@ -746,9 +746,8 @@ public class AudioService extends IAudioService.Stub { BluetoothProfile.A2DP); } mHdmiManager = (HdmiControlManager) mContext.getSystemService(Context.HDMI_CONTROL_SERVICE); if (mHdmiManager != null) { if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_HDMI_CEC)) { mHdmiManager = mContext.getSystemService(HdmiControlManager.class); synchronized (mHdmiManager) { mHdmiTvClient = mHdmiManager.getTvClient(); if (mHdmiTvClient != null) { Loading
services/java/com/android/server/SystemServer.java +4 −4 Original line number Diff line number Diff line Loading @@ -1011,6 +1011,10 @@ public final class SystemServer { mSystemServiceManager.startService(SoundTriggerService.class); if (!disableNonCoreServices) { if (!disableTrustManager) { mSystemServiceManager.startService(TrustManagerService.class); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_BACKUP)) { mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS); } Loading Loading @@ -1140,10 +1144,6 @@ public final class SystemServer { } Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER); if (!disableTrustManager) { mSystemServiceManager.startService(TrustManagerService.class); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) { mSystemServiceManager.startService(FingerprintService.class); } Loading