LineageHardwareService: Publish binder service during onStart()
According to the lifecycle of a SystemService, onStart() is called to get the service running and the service should publish its binder interface at that point. Change-Id: I99031807f45d8d7e048582749b1ba6885aa12af4
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2016 The CyanogenMod Project
|
||||
* 2017-2019 The LineageOS Project
|
||||
* 2017-2020 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -176,7 +176,6 @@ public class LineageHardwareService extends LineageSystemService {
|
||||
super(context);
|
||||
mContext = context;
|
||||
mLineageHwImpl = getImpl(context);
|
||||
publishBinderService(LineageContextConstants.LINEAGE_HARDWARE_SERVICE, mService);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -196,6 +195,7 @@ public class LineageHardwareService extends LineageSystemService {
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
publishBinderService(LineageContextConstants.LINEAGE_HARDWARE_SERVICE, mService);
|
||||
}
|
||||
|
||||
private final IBinder mService = new ILineageHardwareService.Stub() {
|
||||
|
||||
Reference in New Issue
Block a user