Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f67fa09c authored by Caitlin Cassidy's avatar Caitlin Cassidy Committed by Android (Google) Code Review
Browse files

Merge "[Dagger] Add BatteryMeterViewController. Future CLs will move...

Merge "[Dagger] Add BatteryMeterViewController. Future CLs will move Dependency.get calls from BatteryMeterView to this controller." into sc-v2-dev
parents db094748 50f3e9cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@
            android:layout_height="match_parent"
            android:paddingEnd="@dimen/signal_cluster_battery_padding" />

        <com.android.systemui.BatteryMeterView
        <com.android.systemui.battery.BatteryMeterView
            android:id="@+id/batteryRemainingIcon"
            android:layout_height="match_parent"
            android:layout_width="0dp"
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@
                android:layout_height="match_parent"
                android:paddingEnd="@dimen/signal_cluster_battery_padding" />

            <com.android.systemui.BatteryMeterView
            <com.android.systemui.battery.BatteryMeterView
                android:id="@+id/batteryRemainingIcon"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
        android:gravity="center_vertical"
        android:orientation="horizontal"/>

    <com.android.systemui.BatteryMeterView android:id="@+id/battery"
    <com.android.systemui.battery.BatteryMeterView android:id="@+id/battery"
        android:layout_height="match_parent"
        android:layout_width="wrap_content"
        android:clipToPadding="false"
+8 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.keyguard.dagger;

import com.android.keyguard.CarrierText;
import com.android.systemui.R;
import com.android.systemui.battery.BatteryMeterView;
import com.android.systemui.statusbar.phone.KeyguardStatusBarView;

import dagger.Module;
@@ -31,4 +32,11 @@ public abstract class KeyguardStatusBarViewModule {
    static CarrierText getCarrierText(KeyguardStatusBarView view) {
        return view.findViewById(R.id.keyguard_carrier_text);
    }

    /** */
    @Provides
    @KeyguardStatusBarViewScope
    static BatteryMeterView getBatteryMeterView(KeyguardStatusBarView view) {
        return view.findViewById(R.id.battery);
    }
}
+5 −2
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 The Android Open Source Project
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.systemui;
package com.android.systemui.battery;

import static android.provider.Settings.System.SHOW_BATTERY_PERCENT;

@@ -50,6 +50,9 @@ import android.widget.TextView;
import androidx.annotation.StyleRes;

import com.android.settingslib.graph.ThemedBatteryDrawable;
import com.android.systemui.Dependency;
import com.android.systemui.DualToneHandler;
import com.android.systemui.R;
import com.android.systemui.animation.Interpolators;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher;
Loading