WiFi: "Connect" option disappear after rotating.

The connect option disappears because there is a problem in saving and
restoring the state of the access point showed in the dialog box. When a
rotation accurs, the framework calls onSaveInstanceState(Bundle outState)
of the wifisettings activity. In this method, the state of the access is
saved, but not its rssi level. After a rotation, when restoring the access
point state, the rssi is initialized to the default value, which means out of
range. This is why the connect option is not displayed. I fixed the issue by
saving and restoring the rssi level of the access point.

Change-Id: Ibd58132c922828941603673383ff81f25d61556e
Orig-Change-Id: I624cc8ce82a69fd94931088dc0f7833663ef0772
Signed-off-by: Paul Naoumenko <paulx.naoumenko@intel.com>
Signed-off-by: Jean-Marie Lemetayer <jean-mariex.lemetayer@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 34109
WiFi: Fix Null Pointer Exception in Wifi Settings dialog

This patch checks that the activity remains available in the
dialog onclick callback before using it.

Change-Id: I1886b87498455e890962415a864da803c94561a4
Orig-Change-Id: I1d7aba1b43a00568dcfaf580e7082aadc12ebde5
Signed-off-by: Loic Poulain <loicx.poulain@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 122149
This fixes crash caused by null pointer

The crash is caused by a null pointer.
This patch prevents the dereferencement of the pointer when null.

Change-Id: I7a5aa23342bf7e6ba072c8bd2533ae574e2d0150
Author: Ovidiu Beldie <ovidiux.beldie@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 42641
Fix one NPE in tethering setting

Once we not declare BT feature, go Setting->more->tethering
will trigger this NPE.

Change-Id: I4736e7bade261475acda74e26250a81452018ffa
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Settings: Fix the memory leak in Settings

Fixed the memory leak in both InstalledAppDetails

Change-Id: I3520b3c1fe1bf98e3baec2ee989eb215164a7cf2
Signed-off-by: Zhijun Peng <pengzhj@marvell.com>
Fix WifiManager melory leak, change context to getApplicationContext

Change-Id: Iba90045c4e31537defeec7a6f965d3b764065864
Signed-off-by: annieyu <annieyu@huaqin.com>