Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SystemUIGoogle: Fix BatteryControllerImplGoogle injection
Change-Id: I4bc2b02f2928cb231413fb60aecf3ef58b9fcb96
- Loading branch information
1 parent
5dcd8c4
commit 91dc9b5
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...e/src/com/google/android/systemui/statusbar/policy/dagger/SystemUIGooglePolicyModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (C) 2023 The PixelExperience Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.android.systemui.statusbar.policy.dagger; | ||
|
||
import android.content.Context; | ||
import android.os.Handler; | ||
import android.os.PowerManager; | ||
|
||
import com.android.systemui.broadcast.BroadcastDispatcher; | ||
import com.android.systemui.dagger.SysUISingleton; | ||
import com.android.systemui.dagger.qualifiers.Background; | ||
import com.android.systemui.dagger.qualifiers.Main; | ||
import com.android.systemui.demomode.DemoModeController; | ||
import com.android.systemui.dump.DumpManager; | ||
import com.android.systemui.power.EnhancedEstimates; | ||
import com.android.systemui.settings.UserContentResolverProvider; | ||
import com.android.systemui.statusbar.policy.BatteryController; | ||
|
||
import com.google.android.systemui.statusbar.policy.BatteryControllerImplGoogle; | ||
import com.google.android.systemui.reversecharging.ReverseChargingController; | ||
|
||
import dagger.Module; | ||
import dagger.Provides; | ||
|
||
@Module | ||
public class SystemUIGooglePolicyModule { | ||
@Provides | ||
@SysUISingleton | ||
static BatteryController provideBatteryController( | ||
Context context, | ||
EnhancedEstimates enhancedEstimates, | ||
PowerManager powerManager, | ||
BroadcastDispatcher broadcastDispatcher, | ||
DemoModeController demoModeController, | ||
DumpManager dumpManager, | ||
@Main Handler mainHandler, | ||
@Background Handler bgHandler, | ||
UserContentResolverProvider userContentResolverProvider, | ||
ReverseChargingController reverseChargingController) { | ||
BatteryController bC = new BatteryControllerImplGoogle( | ||
context, | ||
enhancedEstimates, | ||
powerManager, | ||
broadcastDispatcher, | ||
demoModeController, | ||
dumpManager, | ||
mainHandler, | ||
bgHandler, | ||
userContentResolverProvider, | ||
reverseChargingController); | ||
bC.init(); | ||
return bC; | ||
} | ||
} |