OSDN Git Service

Add power off button to quick settings dropdown box
authorDaniel Leung <daniel.leung@intel.com>
Thu, 13 Dec 2012 21:28:11 +0000 (13:28 -0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:48:25 +0000 (10:48 +0800)
commit656918ee19fad582010f6c1b18006123a9ae9be9
treeb45d75d40830bca67c08b11f2f771f2b86164ab2
parent2319d3c5869b96b1c90f1b96c814ff56b3c0db22
Add power off button to quick settings dropdown box

Add an option to power off the device in the quick settings
drop-down dialog. It is necessary for devices which the power
button does not function as Android expected. For example,
the hardware only sends button down event but no button up
event, or there is not long press event emitted what-so-ever.
Clicking on this button asks user for confirmation, and fires
the shutdown intent.

Issue: AXIA-1271
Change-Id: I12c3af70d39d45a2974f8fca03eb332e68017e15
Original-Change-Id: Iba14b10d12e788f9df6038e20aa98384838531e0
Original-Change-Id: Ic973ebf43b79b436a9e872613b8572a7c77ce0c3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Anton Cherkashyn <antonx.t.cherkashyn@intel.com>
packages/SystemUI/AndroidManifest.xml
packages/SystemUI/res/layout/quick_settings_tile_poweroff.xml [new file with mode: 0644]
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java