make new API to retrieve group identifier level1

For mvno, user can add or edit mvno data field. To pre-provide
the mvno data of the edited apn when the user selects one of
the mvno types, need to support IMSI, SPN, and GID1 data.
To support GID1, make API to retrieve group identifier level1.

Change-Id: I1bc280054cc7cd37e78a279866cefd62872a19fb
handle negative temperature

When the battery temperature drops to below zero, BatteryLevelInit()
fails to show negative temperature. Because the type is unsigned
and the size of bit field is 10 bits.
So to handle negative temperature, change the type of battery temperature
from "char" to "short". And extend the size of temperature bit field
from 10 to 11 bits, which first bit is used for the sign bit.

Before:
31             24                    14                 0
+---------------+---------------------+-----------------+
| Battery Level | Battery temperature | Battery Voltage |
+---------------+---------------------+-----------------+

After:
31           25                      14                 0
+-------------+-----------------------+-----------------+
|Battery Level|  Battery temperature  | Battery Voltage |
+-------------+-----------------------+-----------------+

Bits 31..25: battery level percentage (7 bits unsigned)
Bits 24..14: battery temperature (11 bits signed)
    First bit is used for the sign and others for the temperature
Bits 13..0: battery voltage in 0.001 volt units (14 bits unsigned)

Becuase of changing the format, let the BatteryStatsImpl.VERSION field
increment.

Bug: 8009514
Change-Id: Iaa12f4d3f14e6cf4d73bc1a23d81c60f9677a499
fix potential memory leak

use fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
load BackupAgents with shared libraries

When loading BackupAgents, add shared libraries to the class path.

For example, let's suppose browser contains "A" library using <uses-library>.
During backup or after backup, if access browser, ClassNotFoundException
occurs on and off. Because "A" library is not linked, unexpectedly.
To fix it, add shared libraries to the class path as loading backup agent.

Change-Id: I1a51e485af2748c57cb6a29ed50a0246bb820af6
hide "paste" window when ActionBar is already active

Hide "paste" popup window when ActionBar already has a "paste" menu button.
- The "paste" popup window and "paste" ActionBar menu are duplicated.
- Due to "paste" popup window, hard to press the ActionBar menu.

steps to reproduce:
1. launch Browser and go to "google.com" in landscape mode.
2. long press on URL address (make "Select All") and select "Copy"
3. long press on URL address (make "Select All"), again
4. you can see the "paste" window, although actionbar already has a "paste"
   menu button.

Bug: 8080106
Change-Id: I9abe91cb2d39ea10dd28f72932700b810311b443
Fix Watchdog HeartbeatHandler to run on correct thread

The HeartbeatHandler for the System Server Watchdog has been running
on the wrong thread due to a race condition in initialization.  It's
designed to run on ServerThread, so that it can catch lockups in the
main looper of the System Server.  It has been running on
ActivityManagerThread instead, so it does not detect lockups on the
ServerThread as it should.

ActivityManagerService is calling Watchdog.getInstance() before
ServerThread calls Watchdog.getInstance().init(), so the handler is
being bound to the ActivityManagerThread instead of the ServerThread.

Explicitly bind HeartbeatHandler to ServerThread, so that the Watchdog
catches lockups on this critical thread.

Change-Id: Id3970a3655e2fa1496ce95b87d32270e3955fbae
Reflect current state of torch in navigation ring button.

Change-Id: I2fd7125b9079bc988d006557b2bde232e5e6b207
framework:When turn off of SoftAp immediately call turning ON SoftAp

Due to sub system restart,There is state change of softAp tether state machine
in tethered state triggering turnoff SoftAp this should be
follwed by turnon softap.

Change-Id: I08ebbe064a285841c3f4e712383e8228679c0b13
revert: make new API to retrieve group identifier level1

For mvno, user can add or edit mvno data field. To pre-provide
the mvno data of the edited apn when the user selects one of
the mvno types, need to support IMSI, SPN, and GID1 data.
To support GID1, make API to retrieve group identifier level1.

Change-Id: I3ffd6262b82da3c871110f07f35a92262f8a9597
hide statusbar clock if using deskclock

Change-Id: Idb83dfcdec4d151cf753dae3dca80a26c20ba53a