SystemUI: kill MSim logspew

Change-Id: I64ce4e61402d43d4d12ef6a80a9cb42b2fb2979a

(cherry picked from commit cf7c4a8148d9c4d86f8105b8795629a96f8ec15f)
WiFi : Fix to DHCP to static IP configuration problem

WiFiStateMachine shall update the IP address configuration to
the kernel through NetworkManagementService.This notification
from the kernel is again sent to the connectivity service
through the NetLinkStateTracker and WiFiStateMachine.
Thus ,if the interface is down during this IP address
reconfiguration (for the case of DHCP to Static IP configuration),
Connectivity service shall be notified with old IP address ,NULL(0)
IP address(signifying interface down) and the latest IP address.
This notification was done by updating the IP address using a local
variable , and hence the second notification on the interface down
is over ridden by the last notification , resulting in missed
interface down notification to the connectivity service.This
resulted in failed data connection when IP address is changed from
DHCP to IP on the fly.
Hence ,this gerrit enhances the design and also pass the updated
IP address to the connectivity service.

Change-Id: I50cd0502c5f8259b1325ed68de870b592d96ae22
CRs-Fixed: 750277

(cherry picked from commit d20318bd5213dfcaaf867e0d64f8e0a71dae79cf)
Wifi: Add a flag to indicate duplicate network

Add a flag to indicate if a wifiConfiguration is duplicate or not
This flag decides whether the previous network history along
with IP and proxy configurations are required to be copied
or not.

Change-Id: I663d985031c82e64f889044441daee70d17e5ddc
CRs-Fixed: 760505

(cherry picked from commit b4424df6ff73d645712231b3421b088fee919dca)
Revert "wlan: Provide runtime option to enable or disable rssi threshold (base)"

This reverts commit b95c030a6ffa22b8c96d5358ee34ed835085a172.

RSSI threshold parameters are now user configurable.Below are the
parameters.
THRESHOLD_UNBLACKLIST_HARD_5G
THRESHOLD_UNBLACKLIST_SOFT_5G
THRESHOLD_UNBLACKLIST_HARD_24G
THRESHOLD_UNBLACKLIST_SOFT_24G
THRESHOLD_INITIAL_AUTO_JOIN_ATTEMPT_RSSI_MIN_5G
THRESHOLD_INITIAL_AUTO_JOIN_ATTEMPT_RSSI_MIN_24G

Hence reverting the gerrit

Change-Id: I0d589cd494a488a4618434314e76fefde1275abd
CRs-Fixed: 757958

(cherry picked from commit a30f49f466c678714321bbb355aaceccf12eb985)
Enable native tracking for RS contexts to improve GC behavior.

This should prevent apps from leaking RS contexts as easily.

bug 18579193

Change-Id: I2d943ce4443ce7cb90ebdd3dd37d338eda6df3a2

(cherry picked from commit 534fc294437bae845b130858de1ca4f6ba32a10b)
Fix bugs regarding delay the dispatching of non-wakeup alarms

checkAllowNonWakeupDelayLocked() method determines that delay the dispatching of non-wakeup alarms.
(there are no wakeup alarms and the screen is off, it can delay until the future.)

if there is any pending non-wakeup alarms, non-wakeup alarm delivery time is bigger than nowELAPSED.
but, checkAllowNonWakeupDelayLocked() returns false and non-wakeup alarm is not delay until future.

i think it is necessary to reverse the inequality symbol on "mNextNonWakeupDeliveryTime > nowELAPSED"
if it isn't, Could you let me know when we get ¡°stuck in a loop¡± in the comment of checkAllowNonWakeupDelayLocked () method?

Change-Id: I7e972064547f4d0a9b4175dbd4cf735b4837abfd
Signed-off-by: Minho Choo <minho.choo@lge.com>

(cherry picked from commit d0c3fe52173c22d70da687c26adbc84a556663fb)
[ActivityManager] Fix NPE when start activity

Symptom:
NPE occurs in line 1184 (resultStack.sendActivityResultLocked)
because resultStack is null.

Root cause:
When starting activity with FLAG_ACTIVITY_FORWARD_RESULT flag,
the resultRecord could be updated, but the resultStack is not
updated as well. In that case, the resultStack is still be
null. The exception will occurs if the activity is not
granted to launch due to permission denied.

Solution:
Update resultStack when resultRecord updates.

Change-Id: I91634e4f713c2e8dbd1a71f358a8fd9beed83ec7

(cherry picked from commit 6ca5bbe5b2147db3478899d13cb9d6289a1dee8d)