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

Commit 8d6125c0 authored by Sven Dawitz's avatar Sven Dawitz Committed by DvTonder
Browse files

SystemUI: Forward port Statusbar Clock and Date actions

Patch set 1-2: Initial port
Patch set 3  : Fixes date click action
Patch set 4  : Remove unused import

Includes:
- Add onClick action to notification clock and date
  In expanded StatusBar
  - clicking clock opens alarms
  - clicking date opens calendar - today selected
  Id: I850732dcca0e65af59ce009aaf9f7ba18bcaf915

- Add onLongClick action to notication clock and date
  - As discussed with ciwrl on google+, LongClick opens DateTimeSettings
  - Moved on-touch color change to superior xml solution, as suggested by
    Andrew Boren <preludedrew@gmail.com> here: http://review.evervolv.com/#/c/3676/"
  Id: I1fae71e347ffcb786227ba0b2651a66f2df35e27

- Add SET_ALARM permission for SystemUI
  If one or more third-party alarm clock app is installed, clicking clock should
  open an app chooser for the alarm clock. However, permission for
  com.android.alarm.permission.SET_ALARM is required to make this behaviour
  work properly.

Change-Id: Iaf8cb9aba6e53da021da5373493b1419096e91fa
parent eb6cde75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
    <uses-permission android:name="android.permission.STATUS_BAR" />
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
    <uses-permission android:name="android.permission.REMOTE_AUDIO_PLAYBACK" />
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />

    <uses-permission android:name="android.permission.MANAGE_USERS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
+9 −0
Original line number Diff line number Diff line
<selector xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:state_pressed="true"
          android:color="@android:color/holo_blue_light"/> <!-- pressed -->
    <item android:state_focused="true"
          android:color="@android:color/holo_blue_light"/> <!-- focused -->
    <item android:color="#ffffff"/>  <!--default -->

</selector>
+9 −0
Original line number Diff line number Diff line
<selector xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:state_pressed="true"
          android:color="@android:color/holo_blue_light"/> <!-- pressed -->
    <item android:state_focused="true"
          android:color="@android:color/holo_blue_light"/> <!-- focused -->
    <item android:color="#cccccc"/>  <!--default -->

</selector>
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@
                android:singleLine="true"
                android:paddingLeft="6dip"
                android:gravity="center_vertical|left"
                android:clickable="false"
                />
        </LinearLayout>
    </LinearLayout>
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
            android:layout_centerVertical="true"
            android:clickable="true"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
Loading