orkut: fix "orkut has stopped" error message when upload a image

An exception java.lang.NullpointerException is thrown because "intent" is
null pointer. here we avold using null intent pointer, the image can be uploaded
into orkut.

Change-Id: I840527f1e00f8c519e086b2a85f6b7054d5a51bf
Author: Dongxing Zhang <dongxing.zhang@intel.com>
Signed-off-by: Dongxing Zhang <dongxing.zhang@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: 39297

Conflicts:
	core/java/android/app/PendingIntent.java
add RTSP scheme

When user types rtsp scheme at the address tool bar, the url is changed
to http scheme. To prevent this, RTSP scheme handling code is added.

Change-Id: I97edc4f4249f8bab9a8657b529473814f8938cc1
ContentProvider: Avoid duplicate initialization of AsyncTask

AsyncTask is being initialized by ActivityThread to ensure its static
handler initilization and ContentProvider need not duplicate the logic.

Change-Id: I48bc88bdba32b56114f09c04a75480e26508f704

Conflicts:
	core/java/android/content/ContentProvider.java
YuvToEncoder patch

The MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
sample rows of Y and 8 each of Cb and Cr.

The original implement of Yuv420SpToJpegEncoder::compress didn't add padding to the frame buffer
when height and width aren't aligned with 16 pixel. It will cause illegal memory violation and core dump.

Change-Id: I3b98b75284fd8ff8e000a30f0f4034be01304ff7
Author: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Tong, Bo <box.tong@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: 47824 19092 19696 18528

Conflicts:
	core/jni/android/graphics/YuvToJpegEncoder.cpp
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
Wrong argument: isValidLockdownProfile

isValidLockdownProfile ignores return value of split in for loop.

Change-Id: Id998cb85ba9db84931fc0ed17f591a35b7168e62
change the policy when connecting to Wi-Fi access point. The secure
AP has higher priority than the open AP.
Change-Id: I4180419bd30619aa7079b8cee0f650d65a813b69
Audio: Fix abnormal keytone playback during silent mode changing

Change-Id: Icfc4003c9756b3c33578c137e59dc4a2b4f25647
Author: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Ertao Zhao <ertaox.zhao@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: 19084 4898
Fix CalendarView CTS failures

Why: Google added a condition to save cpu time(Maybe). It would cause
the CalendarView not showing the title in Jan. because the default
value of mCurrentMonthDisplayed is 0.

How: Assign -1 as default value to mCurrentMonthDisplayed. The
constructor will call goTo() to assign a correct value to it. Not only
that, previously it only shows "month" in the title but now it also
shows year. So I also added a newYearDisplayed for showing it correctly.

Verify steps: CTS should not fail in the Holo test in Jan. I have
verified it with android-cts-4.0.3_r1.

Change-Id: I44f938ff416b4943ea36abcd0ceadcbf03ae7377

Conflicts:
	core/java/android/widget/CalendarView.java
[ScreentShot]: change the implementation of get image file size

Because File can't get permission to get file size of screenshot image.
So use InputStream to get file size correctly of screenshot image.

Change-Id: I1c3df40ddd526d3431bc899642d00f4021d7eeb3
Author: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: shi yang <yang.a.shi@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: 30940

Conflicts:
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java