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

Commit e79d9055 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make clock and battery clickable in QS status bar." into pi-dev

parents 3884c102 39bdc507
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
        android:id="@+id/clock"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:minWidth="48dp"
        android:gravity="center_vertical|start"
        android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
        android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
+6 −2
Original line number Diff line number Diff line
@@ -179,9 +179,10 @@ public class QuickStatusBarHeader extends RelativeLayout implements

        mBatteryMeterView = findViewById(R.id.battery);
        mBatteryMeterView.setForceShowPercent(true);
        mBatteryMeterView.setOnClickListener(this);
        mClockView = findViewById(R.id.clock);
        mClockView.setOnClickListener(this);
        mDateView = findViewById(R.id.date);
        mDateView.setOnClickListener(this);
    }

    private void updateStatusText() {
@@ -413,9 +414,12 @@ public class QuickStatusBarHeader extends RelativeLayout implements

    @Override
    public void onClick(View v) {
        if(v == mDateView){
        if (v == mClockView) {
            Dependency.get(ActivityStarter.class).postStartActivityDismissingKeyguard(new Intent(
                    AlarmClock.ACTION_SHOW_ALARMS),0);
        } else if (v == mBatteryMeterView) {
            Dependency.get(ActivityStarter.class).postStartActivityDismissingKeyguard(new Intent(
                    Intent.ACTION_POWER_USAGE_SUMMARY),0);
        }
    }