25532 Commits

Author SHA1 Message Date
Elliott Hughes
d3c01012d8 Deprecate those parts of DateUtils the documentation says not to use.
Applications using these fields and methods are just asking for i18n bugs.

Also @deprecate two int[]s that were never meant to be public.

Change-Id: I29b3a1c0c663fe344d2567df6ed3bb537270b3b7
2012-09-14 16:06:50 -07:00
Jean-Baptiste Queru
1ca2fee954 Merge "Make default value of auto-sync in SyncStorageEngine configurable" 2012-09-05 11:03:13 -07:00
Yameng Huang
2b5d0ea5e9 Make default value of auto-sync in SyncStorageEngine configurable
This will make the default value of the automatic synchronization
in the SyncStorageEngine configurable with overlays for use by
vendors who want or have legal requirements to have the synchronization
off by default.

Change-Id: Iabdb355c4a1169fe8e254e91c43e162c5913d5e0
2012-09-03 12:49:31 +02:00
Jorge Ruesga
1bcfe84179 SearchWidget: passing APP_DATA to voice intent
SearchView uses SearchManager.APP_DATA to pass data between the origin activity
and the search activity. This works for text searches (keyboard), but it's not
implemented by voice recognition searches. The method createVoiceAppSearchIntent
initializes a empty bundle that is filled with the QUERY parameter.
This patch adds the SearchManager.APP_DATA parameter if is present, let the
search activity access to the data passed by the origin activity

Patch 2: Fix code style

Change-Id: I52dce34e1efd07a30ad74d52bfc60fbae1c4310b
2012-09-03 01:26:59 +02:00
Johan Redestig
8655e9085c onSavePassword dialog can leak when WebViewClassic is destroyed.
The AlertDialog creates in onSavePassword method leaks if
WebViewClassic is destroyed when the dialog is shown.

Change-Id: I81f20e1dd138467a6413766c0a081b389b334ae0
2012-08-30 10:13:41 +02:00
Johan Redestig
3cd42dfd50 Make addAddress locale safe
Using regular string concatenation to avoid unexpected
results in some locales.

Change-Id: I47dd5e174c4a2e88dc18e014002820cdbf63fcad
2012-08-29 08:07:02 +02:00
Jean-Baptiste Queru
416362e6d8 Merge "Change StringTokenizer to TextUtils.StringSplitter" 2012-08-28 12:22:39 -07:00
Jean-Baptiste Queru
78ad66b43c Merge "[Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal." 2012-08-28 10:43:10 -07:00
Steve Pomeroy
ca3363775e Fixes relative time formatting issue for dates in future
All variations of getRelativeTimeSpanString() now properly handle dates
that are in the future. Prior, the version used by
getRelativeDateTimeString() would occasionally show the time instead of
a date when the future date was the same weekday as the current weekday.
This resulted in the time output being duplicated, eg.: "11:23, 11:23"

Change-Id: If20972a6942cce792fa233437f94dedfb71379f3
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
2012-08-27 02:20:13 -04:00
Dianne Hackborn
8bfba7df37 Merge "fix wrong substring" 2012-08-23 14:10:31 -07:00
Johan Rosengren
0dc291eef6 Protecting more views from (bad) MotionEvents
When handling MotionEvents, the method findPointerIndex can return -1
if the current pointer id can't be translated to a pointer index.
Some views are not handling this, which will lead to an out-of-
index crash. In 2585e9b there were checks added, this change adds
some more.

Change-Id: I93ce2420afd83a06b689a1ed35ead7d170cd68f1
2012-08-23 13:46:14 +02:00
Masanori Ogino
08bab56f68 fix wrong substring
The tokenOffsets is the offset from trimed contentLine.
But it is used in substring as the offset from un-trimed contentLine.

How to reproduce bug (ICS and before):
1. Add a contact record with name and a phone number (ex. 090-1111-2222)
2. Search by "0" in Contacts app
3. Contacts shows a wrong number something like "0900111102222"

Change-Id: I1e1cb2f3bd135d98e1573a50aa6ddc021af35b9f
2012-08-23 14:06:45 +09:00
Chih-Wei Huang
21326d8b77 Avoid system_server crashing due to mac address is null
It's possible that the mac address is null (getMacAddress() of WifiNative.java).
In this case system_server will crash like:

E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiWatchdogStateMachine
E AndroidRuntime: java.lang.NullPointerException
E AndroidRuntime:        at android.net.arp.ArpPeer.<init>(ArpPeer.java:57)
E AndroidRuntime:        at android.net.wifi.WifiWatchdogStateMachine.doArpTest(WifiWatchdogStateMachine.java:866)

Check the mac address before parsing to avoid crashing.

Change-Id: I5d4205c04d479a3a2837172c6382816ea4bf74d6
2012-08-22 11:26:51 +08:00
Dianne Hackborn
b0b4a70440 Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH" 2012-08-21 15:12:45 -07:00
Jean-Baptiste Queru
f515c6f4fe Merge "Switch widget: Fix ON/OFF option update error" 2012-08-20 14:28:33 -07:00
Kenny Root
4c74f8c171 Use Libcore.os.umask for setting umask
Libcore.os now provides a umask method call, so just use that since it's
available.

Change-Id: I8826fa40bcab3d61a424ff98a8050d3e44f7ec34
2012-08-20 12:24:05 -07:00
Vairavan Srinivasan
7335cfd9bb ActivityThread: Avoid creating duplicate handlers and reuse mH
sMainThreadHandler is used for notification of changes in
SharedPreferences and refers to a new instance of Handler instead
of the existing instance, mH, of the ActivityThread. Fix to reuse
existing handlers associated with main looper.

Change-Id: I794a5802a9eacdb188bd0619db5e70e3ae89a07d
2012-08-18 18:36:03 -07:00
Robert Greenwalt
6626398a72 Merge "Fix for updating TCP buffer size when switching network type" 2012-08-17 13:01:49 -07:00
Jean-Baptiste Queru
a688af9c67 Merge "TabHost key handling corrected" 2012-08-17 10:02:50 -07:00
Magnus Strandberg
1968256926 Fix for updating TCP buffer size when switching network type
When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Change-Id: Iaa527c84f56cae108f4c7276bbed10552faaff6c
2012-08-17 11:38:44 +02:00
bxu10X
96ac720117 [Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal.
When long press camera key, dispatchKeyEvent function will add control surface after the control view hide,
actually, we needn't show control view after we press camera key.

Change-Id: I45175c4eb97b3f13469cd9d8bacb295c9c5803dd
Author: Bin Xu <bxu10X@intel.com>
Signed-off-by: Bin Xu <bxu10X@intel.com>
Singed-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: 28344
2012-08-17 10:52:33 +08:00
Kenny Root
98e15e7893 Use Libcore's stat instead of FileUtils#getFileStatus
Remove the last user of FileUtils#getFileStatus and move it to
Libcore.os.stat instead. Then we can remove the JNI code that does the
equivalent of a stat.

Change-Id: Ieb566a2a8a17c2dd0150724b4eb3ac1cc41c823d
2012-08-16 15:27:55 -07:00
Kenny Root
786cbcacd2 Use Libcore.os.stat instead of FileUtils
PackageManagerService just needed to know the owner for this file, so
just use stat instead so we can remove the old JNI code.

This is the last user of FileUtils#getPermissions so just remove the
FileUtils method as well.

Change-Id: I953057cd6b9de4410f33b6f22e4bddff02fe2988
2012-08-16 15:27:55 -07:00
Kenny Root
9b0da58e3a Merge "Introduce a restorecon JNI binding." 2012-08-16 14:38:30 -07:00
Kenny Root
bdd23ae9f5 Use libcore Posix class for StatFs implementation
Remove some JNI and duplicated functionality and use libcore's Posix
class for the statfs function instead.

Change-Id: Ic1e161dc10c18c2c6ee81d895a0efd8910086dbf
2012-08-16 10:55:47 -07:00
Ali Utku Selen
0a12018e4c Change StringTokenizer to TextUtils.StringSplitter
Replacing StringTokenizer to TextUtils.StringSplitter,
since TextUtils.StringSplitter is more suitable for basic splitting tasks.
Also increased initial values for HashMap and StringBuilders to avoid
unnecessary buffer enlargement operations. This improves the performance
of these operations.

Change-Id: If9a5b68e6596ba9a6d29597876b6164ef34b57ac
2012-08-10 09:24:42 -07:00
Jean-Baptiste Queru
37548994e6 Merge "StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test." 2012-08-10 09:04:05 -07:00
Jean-Baptiste Queru
6d0dd51ebb Merge "Return early when checking divider before child zero." 2012-08-08 13:20:07 -07:00
Jean-Baptiste Queru
7835d4fb4e Merge "Fix SurfaceView notifies on invalid surfaces." 2012-08-08 13:20:00 -07:00
Jean-Baptiste Queru
9ab84c203f Merge "Fix wrong count return for getPhoneSignalStrengthCount" 2012-08-08 12:59:06 -07:00
Jean-Baptiste Queru
6fb8fe9aba Merge "StrictMode.permitCustomSlowCalls() should call disable(DETECT_CUSTOM)" 2012-08-08 12:06:26 -07:00
Jean-Baptiste Queru
d77d17c28d Merge "Fix cursor memory leak" 2012-08-08 10:44:50 -07:00
Jean-Baptiste Queru
2278e60c39 Merge "Adds missing Bluetooth as network type." 2012-08-08 10:43:20 -07:00
Chuanxia Dong
6614bb6579 StorageManager: fix issue that GREF has increased to 2011 in system server with intel stress test.
Issue description:
When run ICS stress test, always meet GREF issue. one of contributor is MountService$MountServiceBinderListener.
log info
19:21:11.609   222 24316 W dalvikvm:        24 of com.android.server.am.ActivityManagerService$AppDeathRecipient (24 unique instances)
19:21:11.609   222 24316 W dalvikvm:       479 of com.android.server.MountService$MountServiceBinderListener (479 unique instances)
19:21:11.619   222 24316 W dalvikvm:         7 of com.android.server.accessibility.AccessibilityManagerService$6 (7 unique instances)
Note: PID 222 is system server.

Issue alaysis:
Everyone can call getSystemService(Context.STORAGE_SERVICE) to get service.
When other service get StorageManager, StorageManager will new MountServiceBinderLister and
register a listener in MountService, which won't be unregistered. It's easy to generate a lot of
instance of unused MountService$MountServiceBinderListener in system server.

Issue fix:
So change the policy to be:
1. Doesn't new MountServiceBinderLister in construction.
2. when other service needs to register listener in StorageManager,
StorageManager will register listener with MountService.
3. When other service needs to unregister listener in StorageManager,
if there is no more other listeners in StorageManager, StorageManager
will unregister listener in MountService.

Change-Id: Iaaf889f44a1a5f62b9f65b3ab1b486c9b7dcaf7f
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare  <bruce.j.beare@intel.com>
2012-08-06 14:53:17 +08:00
Andreas Röhl
f750b8ce3c Fix SurfaceView notifies on invalid surfaces.
SurfaceView notifies registered callbacks on invalid
Surfaces.

Change-Id: Iddc9a5cd073fb73a0e7e9b9ca64ff4fac0777ca7
2012-07-30 15:34:55 +02:00
Jake Wharton
825992f503 Return early when checking divider before child zero.
Previously the `getChildAt` method would be called with an index of -1 which
would lead to an exception being thrown and caught. This is unnecessary since
we know there will never be a divider before the first child. It also avoids
additional object creation since this method can be invoked quite frequently.

Change-Id: Iab44520d5d52f96a829a009cdd1201696edbf9a4
2012-07-28 21:40:04 -07:00
Naveen Kalla
897b311ccb Telephony: Add HSPAP to getTcpBufferSizesPropName
When device is camped on HSPAP TCP Buffer sizes need to be configured
properly to support higher data rates. Without this change, default TCP
buffer sizes will be used and throughput will be low.

Change-Id: Ica5884b35851a32e57c82c63b148df5be580ae83
2012-07-26 00:07:20 -07:00
rpcraig
554cb0c290 Introduce a restorecon JNI binding.
Label the vmdl.*\.tmp files and the final .apk file differently.
Modify the WallpaperManagerService to restorecon the wallpaper file.

Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

Change-Id: Idfc056e9ec0508d7e11100626a7114f341f1af70
2012-07-25 11:07:39 -04:00
Yu Haonong
ca13b1562c Switch widget: Fix ON/OFF option update error
When calling setChecked() from a listener which is invoked by
the Switch toggle, setChecked() will be called recursively,
causing the value of mThumbPosition overridden by the outer
setChecked(). This make the nested setChecked() unable to update
the "Thumb" position correctly.

Set mThumbPosition to sync up with the exact checked state of
the Switch to avoid update error.

Issue 34748

Change-Id: Id4aa389114dcc590430b11626c80d29c9c6016a0
Signed-off-by: Yu Haonong <yuhaonong@gmail.com>
2012-07-18 16:29:54 +08:00
Wink Saville
33034b13ca Create telephony-common and mms-common - DO NOT MERGE
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-17 12:23:09 -07:00
Catherine Liu
fb90081351 Fix wrong count return for getPhoneSignalStrengthCount
Test report for the time spent in each signal strength bin, along
with the number of times that bin was entered showed the result
as Bin=3 Time=3211926000 Count=0. With a non-zero Time, the Count
value 0 was wrong.

The cause of the problem was that getPhoneSignalStrengthCount() used
mPhoneDataConnectionsTimer, instead of mPhoneSignalStrengthsTimer,
to get the count.

Change-Id: I55ac1125abfcfdc105605d76d1c706ac315b90cc
2012-07-17 14:12:56 -05:00
Qi Wang
097fbf2e98 StrictMode.permitCustomSlowCalls() should call disable(DETECT_CUSTOM) 2012-07-13 09:26:03 +08:00
Håkan3 Johansson
011238bd8d Adds missing Bluetooth as network type.
The network connection type for Bluetooth is added so
that it is possible to use Bluetooth as Hotspot during
download from the Internet.

Change-Id: If8e8a3f69821beef742bc91d7a292a091861b48b
2012-07-10 15:03:54 +02:00
Catherine Liu
3f824c0e72 Fix cursor memory leak
In current code, if an application opens a cursor to access a
provider, and doesn't close that cursor, later, when this cursor
is garbage collected, it won't get closed. This will cause a memory
leak in the provider. The leaked memory can only be reclaimed when
the application with the leaked cursor was dead.

The solution is, close the cursor when it's garbage collected.

Change-Id: I786915c46d4672b6b1b37414b3bc1ff8cea2e00b
2012-07-09 16:34:58 -05:00
Romain Guy
13a3a87fa7 am dc99555d: Merge "Pass SearchView suggestion cursor exception to Log."
* commit 'dc99555d61d50820b398096bb774ee56b2500476':
  Pass SearchView suggestion cursor exception to Log.
2012-07-06 23:52:55 -07:00
Jake Wharton
73af451694 Pass SearchView suggestion cursor exception to Log.
When an error in fetching a column occurs in your suggestions cursor
adapter this will ensure the stacktrace is logged to provide more
context about what failed.

Change-Id: Iafe4918caebb9b0fb712b758b2d3ace329fd2512
2012-07-06 23:15:49 -07:00
Scott Main
480785dabb am fd516987: docs: misc bugs from external tracker
* commit 'fd516987de29a48425da5ee5aace5be40adcc674':
  docs: misc bugs from external tracker
2012-07-03 18:15:19 -07:00
Scott Main
fd516987de docs: misc bugs from external tracker
Change-Id: I02d0d82c220401ac3a1ca180e8331a0f6dcd9e50
2012-07-03 18:08:19 -07:00
Scott Main
7034ed833f am 5a883824: Merge "docs: fix document issue 27549" into jb-dev
* commit '5a883824a2e97e0ccb08b4fe30accde6542f3f39':
  docs: fix document issue 27549
2012-07-03 11:54:11 -07:00
Scott Main
5a883824a2 Merge "docs: fix document issue 27549" into jb-dev 2012-07-03 11:51:30 -07:00