Move time setting code from SystemClock to AlarmManagerService

On devices using /dev/rtc instead of /dev/alarm, updating the
time-of-day clock and RTC are separate syscalls.  Hence the clock and
RTC could be left in inconsistent states if two threads called
SystemClock.setCurrentTimeMillis() simultaneously.

By moving this code into AlarmManagerService, we can put a global lock
around AlarmManagerService.setTime() and prevent the race condition.

Note that access to SystemClock.setCurrentTimeMillis() is now gated by
android.permission.SET_TIME, where before it was gated by filesystem
permissions (i.e., could the process write to /dev/alarm or /dev/rtc).

Change-Id: Ia34899a4cde983656305fd2ef466dfe908ed23c8
Signed-off-by: Greg Hackmann <ghackmann@google.com>

Conflicts:
	core/jni/android_os_SystemClock.cpp
Update layoutlib method for SystemClock

Update layoutlib to reflect changes from
http://android-review.googlesource.com/83061/

Change-Id: If7326f3af2a97271ad1465382944e1f078b965d8
Catch the NameNotFoundException and return to avoid null pointer when updating package in AMS.

Change-Id: I26cf200cc84639e1261085b6905a567320cbb0a9
Author: Bing Deng <bingx.deng@intel.com>
Signed-off-by: Bing Deng <bingx.deng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 63612
[1/3] base: battery light settings

This also adds a new "level" for 100% full battery
to get rid of the comments from people who complain
that 90% is shown as full :)

required overlay:
    <!-- Is the battery LED intrusive? Used to decide if there should be a disable option -->
    <bool name="config_intrusiveBatteryLed">true</bool>

    This will enable if the batter light option is shown in settings

    <!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
    <bool name="config_multiColorBatteryLed">true</bool>

    Also set this for devices like the HTC one which has only
    two colors. This will be handled in the color selction dialog.
    Dont set if for devices like flo which only has white led

Change-Id: I6a173d19b4e1135174de73a9f528a61d81eb50da

Conflicts:
	core/java/android/provider/Settings.java
	services/java/com/android/server/BatteryService.java