OSDN Git Service

android-x86/frameworks-base.git
7 years agoZygote : Block SIGCHLD during fork.
Narayan Kamath [Mon, 7 Nov 2016 16:22:48 +0000 (16:22 +0000)]
Zygote : Block SIGCHLD during fork.

Fix merge conflict into mnc-mr2-release
We close the android logging related sockets prior as late as possible
before every fork to avoid having to whitelist them. If one of the
zygote's children dies after this point (but prior to the fork), we can
end up reopening the logging sockets from the SIGCHLD signal handler.

To prevent this from happening, block SIGCHLD during this critical
section.

Bug: 32693692
Test: Manual

(cherry picked from commit e9a525829a354c92983a35455ccab16d1b0d3892)

Zygote: Unblock SIGCHLD in the parent after fork.

Follow up to change e9a525829a354c92983a. Allows the zygote to
receive SIGCHLD again and prevents the zygote from getting into a
zombie state if it's killed.

Contributed-By: rhed_jao <rhed_jao@htc.com>
Bug: 32693692
Test: manual

(cherry picked from commit 1480dc3e97b661f5bfa3a5c2fbce72385b8d2be6)

Change-Id: If89903a29c84dfc9b056f9e19618046874bba689

7 years agoDO NOT MERGE) ExifInterface: Close the file when an exception happens
Sungsoo [Tue, 18 Oct 2016 05:12:00 +0000 (14:12 +0900)]
DO NOT MERGE) ExifInterface: Close the file when an exception happens

Bug: 32068647, Bug: 30936376
Change-Id: I22fa2384348c890ca726d2b1632cd54e59d25a8f
(cherry picked from commit cb17930077de640411407636eebc000e2d06dd9c)

7 years agoDO NOT MERGE Isolated processes don't get precached system service binders
Christopher Tate [Tue, 16 Aug 2016 23:03:44 +0000 (16:03 -0700)]
DO NOT MERGE Isolated processes don't get precached system service binders

More specifically, they get a PackageManager binder -- necessary for
Android process startup and configuration -- but none of the other
usual preloaded service binders.

Bug 30202228

Change-Id: I3810649f504cd631665ece338a83d2e54d41ad05
(cherry picked from commit 2c61c57ac53cbb270b4e76b9d04465f8a3f6eadc)
(cherry picked from commit f4d23f30c92bc80808f57677caab0282c8d28dc6)

7 years agoDO NOT MERGE) ExifInterface: Provide backward compatibility
Sungsoo [Thu, 13 Oct 2016 03:24:16 +0000 (12:24 +0900)]
DO NOT MERGE) ExifInterface: Provide backward compatibility

ExifInterface.saveAttribute() didn't throw UnsupportedOperationException
before. Use IOException instead of UnsupportedOperationException for
backward compatibility.

Bug: 30936376, Bug: 32068647, Bug: 31319086
Change-Id: Iacc7b4d91d49edd7bece8f2e738a633a91025eca
(cherry picked from commit 7ce9243087b04bce719e1f3d10a14b9b26b8ea81)

7 years agoAvoid crashing when downloading MitM'd PAC that is too big am: 7d2198b586 am: 9c1cb7a...
Paul Jensen [Mon, 19 Sep 2016 11:37:54 +0000 (11:37 +0000)]
Avoid crashing when downloading MitM'd PAC that is too big am: 7d2198b586 am: 9c1cb7a273 am: 6634e90ad7
am: 66ee2296a9

Change-Id: Ib0023b44e521b936ab2f9450ad367b1feda64492

7 years agoMerge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537
Jeff Sharkey [Fri, 16 Sep 2016 22:57:34 +0000 (16:57 -0600)]
Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537

Change-Id: Ib1a0bbb34edb61666ac5739f0b0eaadbe4c5fe06

7 years agoDO NOT MERGE Check caller for sending media key to global priority session
Jaewan Kim [Mon, 19 Sep 2016 12:19:55 +0000 (21:19 +0900)]
DO NOT MERGE Check caller for sending media key to global priority session

Prevent sending media key events from the non-system app to the global
priority session through the MediaSessionManager.dispatchMediaKeyEvent().
Note that any app can use the API indirectly with
the public API AudioManager.dispatchMediaKeyEvent().

Bug: 29833954
Tested: Installed malicious apps and confirmed that they don't work.
Tested: Run CtsTelecomTestCases and CtsMediaTestCases
Change-Id: I2a9e78196ba7455324e485f098f095d03b47ee15
(cherry picked from commit c282c4f106bea5c5375fdb6062ffd4fdcf8563a7)

7 years agoFix build break due to automerge of 7d2198b5
Paul Jensen [Mon, 19 Sep 2016 12:53:20 +0000 (08:53 -0400)]
Fix build break due to automerge of 7d2198b5

Bug: 30100884

Change-Id: I8fa379a74b5d9467b5b9498bd18de2a043963c6f
(cherry picked from commit baae57ab24db7d3b0bf7f84c05954173f1ee15fe)

7 years agoDO NOT MERGE: Catch all exceptions when parsing IME meta data
Tadashi G. Takaoka [Fri, 16 Sep 2016 03:12:14 +0000 (12:12 +0900)]
DO NOT MERGE: Catch all exceptions when parsing IME meta data

Bug: 30568284
Change-Id: I0b613f8ce0f014320c5ac1bf445699ea2702a0a2
(manually cherry picked from 9b2997d22e6ce2a15065d8e7608dd77b316c2065)

(cherry picked from commit 7bb4c825585d5a6afbb59484ec7db5f5dec1bdaf)

7 years agoDO NOT MERGE: Fix deadlock in AcitivityManagerService.
Sudheer Shanka [Wed, 14 Sep 2016 21:37:14 +0000 (14:37 -0700)]
DO NOT MERGE: Fix deadlock in AcitivityManagerService.

Don't hold mPidsSelfLocked lock when calling
cleanUpApplicationRecordLocked.

Bug: 31463143
Change-Id: I421962cbfd7c466662edcef805c3e27321dc5a98
(cherry picked from commit b59e73613bbaf252e2ee5892d7a95cbbd7d40b26)

7 years agoEnsure munmap matches mmap
John Reck [Mon, 12 Sep 2016 17:43:35 +0000 (10:43 -0700)]
Ensure munmap matches mmap

Bug: 31350622
Change-Id: I6d3f9faec32d54360caa6706d17405e20b50966c
(cherry picked from commit aa394dd42c049479bface1991f11b863dc1a0922)

7 years agoFix setPairingConfirmation permissions issue (2/2)
Marie Janssen [Tue, 9 Aug 2016 20:23:39 +0000 (13:23 -0700)]
Fix setPairingConfirmation permissions issue (2/2)

setPairingConfirmation was set to only require BLUETOOTH_ADMIN
permission which shouldn't be able to set the confirmation itself.

This is restricted to BLUETOOTH_PRIVILEGED permission.

Bug: 29043989
Change-Id: I887de32d156e672ec44aa0b286cd7ea7f9f8ad55
(cherry picked from commit 93326cfd9fb8a20081baa9b975275772798cfd80)

7 years agoDO NOT MERGE) ExifInterface: Make saveAttributes throw an exception before change
Sungsoo [Thu, 8 Sep 2016 07:04:44 +0000 (16:04 +0900)]
DO NOT MERGE) ExifInterface: Make saveAttributes throw an exception before change

ExifInterface object can be created with a unsupported file format.
If saveAttribute is called with an unsupported file format, ExifInterface
makes the file corrupted. This CL prevents those cases by throwing
an exception before making any change on the file.

Bug: 30936376
Change-Id: I915f56b00ec9422b53591ac5534e070a1d6798e6
(cherry picked from commit 2ee53c82cc8c8b2e76a19910074672f6204a5d63)

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0c90dcb323caeda14baf903cc108759:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e6978151bf245a775329cdae5e574d5:
-----------------------------------------------

fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- add /dev/__properties__ to the whitelist.

Change-Id: I709a7f4913e807a8fec8a58c81e98fe5b5222820
(cherry picked from commit 41ca1bce01af7e86aeff9009df54bbc81e3c77d0)

7 years agoDO NOT MERGE: Fix vulnerability where large GPS XTRA data can be
David Christie [Tue, 23 Aug 2016 23:19:51 +0000 (16:19 -0700)]
DO NOT MERGE: Fix vulnerability where large GPS XTRA data can be
injected.
-Can potentially crash system with OOM.
Bug: 29555864

Change-Id: I7157f48dddf148a9bcab029cf12e26a58d8054f4
(cherry picked from commit 5439aabb165b5a760d1e580016bf1d6fd963cb65)

7 years agoBind fingerprint when we start authentication - DO NOT MERGE
Jim Miller [Fri, 19 Aug 2016 03:22:33 +0000 (20:22 -0700)]
Bind fingerprint when we start authentication - DO NOT MERGE

This fixes a bug where it was possible to authenticate the wrong user.
We now bind the userId when we start authentication and confirm it when
authentication completes.

Fixes bug 30744668

Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2
(cherry picked from commit b6f4b48df273d210d13631b4c2426482feb40c97)

7 years agoProcess: Fix communication with zygote.
Narayan Kamath [Tue, 9 Aug 2016 16:00:25 +0000 (17:00 +0100)]
Process: Fix communication with zygote.

Don't write partial requests, and don't return (or throw) early after
partially reading a response.

bug: 30143607

(cherry-picked from commit 448be0a62209c977593d81617853a8a428d013df)

Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1
(cherry picked from commit e29c6493c07acf1a0b706917e9af0c8d761c8ae9)

7 years agoFix vulnerability in LockSettings service
Jim Miller [Wed, 10 Aug 2016 22:43:17 +0000 (15:43 -0700)]
Fix vulnerability in LockSettings service

Fixes bug 30003944

Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d
(cherry picked from commit 2d71384a139ae27cbc7b57f06662bf6ee2010f2b)

7 years agoDO NOT MERGE: Clean up when recycling a pid with a pending launch
Amith Yamasani [Fri, 5 Aug 2016 22:25:03 +0000 (15:25 -0700)]
DO NOT MERGE: Clean up when recycling a pid with a pending launch

Fix for accidental launch of a broadcast receiver in an
incorrect app instance.

Bug: 30202481
Change-Id: I8ec8f19c633f3aec8da084dab5fd5b312443336f
(cherry picked from commit d1eeb5b7b489d47994a71510f1ed5b97b8e32a7a)

7 years agoDO NOT MERGE: Allow apps with CREATE_USERS permission to call UM.getProfiles.
Sudheer Shanka [Fri, 29 Jul 2016 17:50:10 +0000 (10:50 -0700)]
DO NOT MERGE: Allow apps with CREATE_USERS permission to call UM.getProfiles.

Bug: 29189712
Bug: 30317026
Bug: 30235113
Change-Id: Icced9805a56675e86f894c458c4a5a0048fd54c0

7 years agoDO NOT MERGE: Fix CTS regression
Sungsoo Lim [Mon, 25 Jul 2016 02:53:13 +0000 (11:53 +0900)]
DO NOT MERGE: Fix CTS regression

Bug: 30297223, Bug: 30437363
Change-Id: I7b18af40e4eac2713577204428fbfb96cc346582

7 years agoDO NOT MERGE: Remove the use of JHEAD in ExifInterface
Sungsoo Lim [Wed, 13 Jul 2016 00:31:16 +0000 (09:31 +0900)]
DO NOT MERGE: Remove the use of JHEAD in ExifInterface

Bug: 29270469
Change-Id: I6a6c8aeab2a842ff1646316363d614851625e78f

7 years agoDO NOT MERGE Block the user from entering safe boot mode
Benjamin Franz [Tue, 12 Jul 2016 14:20:47 +0000 (15:20 +0100)]
DO NOT MERGE Block the user from entering safe boot mode

Block the user from entering safe boot mode if the DISALLOW_SAFE_BOOT
policy is set.

Bug: 26251884
Change-Id: I4945d5d676928346c11ea305a5b6a2e1a42e94e6

7 years agoAdd bound checks to utf16_to_utf8
Sergio Giro [Tue, 28 Jun 2016 17:26:10 +0000 (18:26 +0100)]
Add bound checks to utf16_to_utf8

Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
(cherry picked from commit 4781057e78f63e0e99af109cebf3b6a78f4bfbb6)

7 years agoCheck caller's uid before allowing notification policy access.
Julia Reynolds [Tue, 28 Jun 2016 19:16:21 +0000 (15:16 -0400)]
Check caller's uid before allowing notification policy access.

Bug: 29421441
Change-Id: I7460268595e932d54660b02007bcd68b95fe8aec

7 years agoFix string equality comparison
Paul Stewart [Mon, 21 Mar 2016 16:51:27 +0000 (09:51 -0700)]
Fix string equality comparison

Don't use "==" to compare strings.

Bug: 25624963
Change-Id: Id25696e4fdcbcf4d48ec74e8ed65c1a33716b30c

7 years agoWifiEnterpriseConfiguration: Do not print credentials in toString
Paul Stewart [Wed, 11 Nov 2015 18:23:43 +0000 (10:23 -0800)]
WifiEnterpriseConfiguration: Do not print credentials in toString

BUG:25624963
Change-Id: I939a12a27d6b915d8a9cc8b142f645fba0ee42ec

7 years agoAdd pm operation to set user restrictions.
Sudheer Shanka [Thu, 16 Jun 2016 15:58:00 +0000 (08:58 -0700)]
Add pm operation to set user restrictions.

Bug: 29189712
Change-Id: I6fdb3b68dfe3f51119e5ce8008880fc7d9c793df

7 years agoReduce shell power over user management.
Sudheer Shanka [Thu, 9 Jun 2016 00:13:24 +0000 (17:13 -0700)]
Reduce shell power over user management.

Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.

Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3

7 years agoDO NOT MERGE Disable app pinning when emergency call button pressed
Hall Liu [Thu, 2 Jun 2016 17:32:08 +0000 (10:32 -0700)]
DO NOT MERGE Disable app pinning when emergency call button pressed

Also disables app pinning when the "return to call" button is pressed
and brings up the in-call screen when app pinning is stopped if there is
an existing call.

Combination of ag/1091397 and ag/1085584 adapted for MNC.

Bug: 28558307
Bug: 28761672
Change-Id: I82ec4042bff387c845ce571b197a4a86e1dd5ec8

7 years agoDO NOT MERGE Fix intent filter priorities
Todd Kennedy [Mon, 4 Apr 2016 19:29:59 +0000 (12:29 -0700)]
DO NOT MERGE Fix intent filter priorities

Since this is a backport, there is only one rule that guards intent
filter priorities:
1) Updates will NOT be granted a priority greater than the priority
   defined on the system image.

Bug: 27450489
Change-Id: Ifcec4d7a59e684331399abc41eea1bd6876155a4

7 years agoDon't trust callers to supply app info to bindBackupAgent()
Christopher Tate [Mon, 13 Jun 2016 22:17:54 +0000 (15:17 -0700)]
Don't trust callers to supply app info to bindBackupAgent()

Get the canonical identity and metadata about the package from the
Package Manager at time of usage rather than rely on the caller to
have gotten things right, even when the caller has the system uid.

Bug 28795098

Change-Id: I215786bc894dedf7ca28e9c80cefabd0e40ca877

Merge conflict resolution for ag/1133474 (referencing ag/1148862)
- directly to mnc-mr2-release

7 years agoBackport of backup transport whitelist
Christopher Tate [Fri, 20 May 2016 22:29:31 +0000 (15:29 -0700)]
Backport of backup transport whitelist

Sysconfig define a whitelist of permitted backup transports

Previously any apk bundled in priv-app could insert a backup transport.
Reduce risk surface by giving the OEM explicit control over who is
allowed to handle backup data.

Bug 28406080

Backport of 494df791728f4d42d67e935c327910975993ad29 from N

Change-Id: I9f90e324169a68720d608f74754d284a7e59cf87

7 years agoBackport ChooserTarget package source check from N
Adam Powell [Thu, 28 Apr 2016 23:32:18 +0000 (16:32 -0700)]
Backport ChooserTarget package source check from N

Fix a bug where a ChooserTargetService could supply a ChooserTarget
pointing at a non-exported activity outside of its own package and
have it launch.

Bug 28384423

Change-Id: I3f5854f91c5695ad9253d71055ef58224df47008

7 years agoDon't pass URL path and username/password to PAC scripts
Paul Jensen [Fri, 15 Apr 2016 14:41:13 +0000 (10:41 -0400)]
Don't pass URL path and username/password to PAC scripts

The URL path could contain credentials that apps don't want exposed
to a potentially malicious PAC script.

Bug: 27593919
Change-Id: I4bb0362fc91f70ad47c4c7453d77d6f9a1e8eeed

7 years agoFix missing permission check when saving pattern/password
Jim Miller [Wed, 13 Apr 2016 23:35:36 +0000 (16:35 -0700)]
Fix missing permission check when saving pattern/password

Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20

8 years agoKill the real/isolated uid group, not the ApplicationInfo uid
Christopher Tate [Mon, 18 Apr 2016 22:16:31 +0000 (15:16 -0700)]
Kill the real/isolated uid group, not the ApplicationInfo uid

This is a direct reimplementation in L of fixes applied to N in
these two commits:

8dc8d37c1d7d694016f1ec2b3cea5fb723567be8
e8741d23d2dd05c4cb3fed5ee6a4040ee96a60e3

Bug 19285814

Change-Id: I59bcc8f1d41c426e9da635bea9ad1d7c6756d5aa

Resolve merge conflict when cp'ing ag/941553 to mnc-mr1-release branch

8 years agoAdd new, hidden MotionEvent flag for partially obscured windows.
Michael Wright [Thu, 31 Mar 2016 00:31:48 +0000 (17:31 -0700)]
Add new, hidden MotionEvent flag for partially obscured windows.

Bug: 26677796
Change-Id: Ic4219b883bb760495e6172ef61e84e9725876ef6

8 years ago[DO NOT MERGE] Disallow guest user from changing Wifi settings
Samuel Tan [Mon, 14 Mar 2016 22:57:02 +0000 (15:57 -0700)]
[DO NOT MERGE] Disallow guest user from changing Wifi settings

Disallow existing and newly created guest users from
changing Wifi settings.

BUG: 27411179
TEST: Flashed device, switched to existing guest user, and verified
      that Wifi settings are disabled.
TEST: Flashed device, created new guest user, and verified that Wifi
      settings are disabled.

Change-Id: Ia1bf4cce0369017b62f69d317c7ab2e30e3949b3

8 years agoRedact Account info from getCurrentSyncs
Matthew Williams [Tue, 19 Jan 2016 23:04:04 +0000 (23:04 +0000)]
Redact Account info from getCurrentSyncs

BUG:26094635
If the caller to ContentResolver#getCurrentSyncs does not hold the
GET_ACCOUNTS permission, return a SyncInfo object that does not
contain any Account information.

Change-Id: I5628ebe1f56c8e3f784aaf1b3281e6b829d19314
(cherry picked from commit b63057e698a01dafcefc7ba09b397b0336bba43d)

8 years agoConflict resolution CL to ag/868720 when cp'ing to mnc-mr1-release
Zach Jang [Sat, 27 Feb 2016 00:06:28 +0000 (16:06 -0800)]
Conflict resolution CL to ag/868720 when cp'ing to mnc-mr1-release

Change-Id: I3efe5476ebd758fc567bfdb035583a01c45aea8b

8 years agoDO NOT MERGE Read Bluetooth interop database entries from settings (1/2)
Andre Eisenbach [Thu, 14 Jan 2016 22:20:34 +0000 (14:20 -0800)]
DO NOT MERGE Read Bluetooth interop database entries from settings (1/2)

Interop database entries are stored in the system settings entry
"BluetoothInteropDatabase". The format is a list of entries separated by
";". An entry consists of a BDA fragment, followed by a comma and an
integer representing a feature from interop.h.

Example:
To disable LE secure connections for devices starting with BDA 11:22:33,
use "11:22:33,0".

Bug: 26548845
Change-Id: I6a9fd34f6af4d3bdfcaa0e051eafebdfbf2a4949
(cherry picked from commit 3bc623be8dd8b83d0a22c5cc5b5a8955001f6fc7)

8 years agoDO NOT MERGE Bluetooth: Restrict gain for Absolute volume case
Liejun Tao [Wed, 20 Jan 2016 23:52:20 +0000 (17:52 -0600)]
DO NOT MERGE Bluetooth: Restrict gain for Absolute volume case

For the lowest music volume steps 1 and 2, restrict the gain to 50% and
75%. This will avoid the lowest volume steps being too loud for some
accessories. For music volume 0, set phone gain to 0 as some
accessories won't mute on their end.

Change-Id: I24e0fa7be8c8635b428a11c91ea153aad7cec55f
Signed-off-by: Liejun Tao <baibai@motorola.com>
8 years agoDO NOT MERGE ANYWHERE: Hack to get devices booting again.
Jeff Sharkey [Fri, 29 Jan 2016 17:45:45 +0000 (10:45 -0700)]
DO NOT MERGE ANYWHERE: Hack to get devices booting again.

If we try scheduling a pass before the system is ready, record a
pending event and dispatch once we're actually ready.

Bug: 26863668
Change-Id: I028285383c8bbe8b653aeaa7544eefe3d41277bc
(cherry picked from commit 538c11cf2175d4e30337e8776401bfede85866be)

8 years agoDO NOT MERGE ANYWHERE: Don't change screen on time on time changes
Adam Lesinski [Wed, 27 Jan 2016 02:18:19 +0000 (18:18 -0800)]
DO NOT MERGE ANYWHERE: Don't change screen on time on time changes

Screen on time should be measured in elapsed realtime, not wallclock.

Cause a checkIdleStates to occur when reloading stats
(on rollover and on time change).

When time changes occur in the negative direction, the new stats file
we create can overlap the previous one with regards to its end timestamp.
Use the begin timestamp to determine which of the latest stats to merge.
(b/22716352)

Bug: 26488100
Change-Id: If31b29bbbee9e98401205b5e26bce86e181286e7

8 years agoDO NOT MERGE Fix for syncs being dropped when appIdle is on
Shreyas Basarge [Mon, 11 Jan 2016 15:43:54 +0000 (15:43 +0000)]
DO NOT MERGE Fix for syncs being dropped when appIdle is on

Syncs were being dropped when appIdleMode was on for
an app. This CL backs off the sync instead of dropping
it. When the app becomes non-idle, backoff is cleared
and the sync is performed.

Bug: 26355386
Change-Id: I2040dfd847011d3ca902e66a8cd52b2a429177c1
(cherry picked from commit 2c051498b2b0e2608740d906e70867b74083107d)

8 years agoDO NOT MERGE Check apps idle states on time changes
Amith Yamasani [Fri, 22 Jan 2016 19:27:16 +0000 (11:27 -0800)]
DO NOT MERGE Check apps idle states on time changes

And ensure that the listeners are informed of app standby transitions
that might occur during time changes.

Fix for apps that sometimes don't have network access until reboot.

Bug: 26488100
Change-Id: Ic342c188a6cd19faee88f50b2c6a342a6968cb23
(cherry picked from commit c465e71cdc401e1565c29a895a5c6d366ba5344c)

8 years agoDO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle
Adam Lesinski [Wed, 13 Jan 2016 20:26:07 +0000 (12:26 -0800)]
DO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle

Ignores the old, re-appropriated key "idle_duration" which is now
set to a high value in order to force disable app idle on devices
with bug b/26355386

Bug:26355386
Change-Id: Iff9de843ad6e547d29c1583687fc7f7ce7e15090

8 years agoDO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time...
Adam Lesinski [Tue, 12 Jan 2016 18:36:09 +0000 (10:36 -0800)]
DO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time would cause crash

With the updated rolling window of stats for app idleness, we need to make sure
it is populated before we initialize some defaults.

Now that we look at older entries to figure out idleness, if those
entries are in the future (due to time change), set them to the current
screen on time.
Bug:26504153

Change-Id: Ia22add0e8eaf0f137002bbe3e91d747fef5b7d69

8 years agoDO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time
Adam Lesinski [Fri, 8 Jan 2016 02:24:53 +0000 (18:24 -0800)]
DO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time

App Idle queries are very frequent and so they only check in memory stats.
However, in memory stats can be missing some entries, especially after a rollover, but also
due to a larger bug fixed in master (too risky to take now).

The fix is to do a deep query (reading older files from disk) and maintain a parallel cache
of stats for app idle. That way the rolling window of data required to serve app idle queries
stays in memory.

Bug:26355386
Change-Id: I6a29bbc25214f6a3c2f24c8c079936e66f99e42e

8 years agoFix missing observer reply callbacks
Amith Yamasani [Fri, 20 Nov 2015 17:44:08 +0000 (09:44 -0800)]
Fix missing observer reply callbacks

This was causing upto 2 seconds in user switching delay.

Bug: 25813588
Change-Id: Icf23b021f134a8ccfa2dae470af02b2da7454acc

8 years agoExit getAllValidScorers early if not the primary.
Jeremy Joslin [Fri, 18 Dec 2015 01:38:04 +0000 (17:38 -0800)]
Exit getAllValidScorers early if not the primary.

This fixes the crash that occurs when getAllValidScorers() is invoked by
a non-primary user when a scorer is active.

BUG: 23040221
Change-Id: I42c9e18d74389be3191258ca5626f2c433ca7cc7
(cherry picked from commit 5b294b45d0d7afbed71fd2e59342c5ad7b8b7d76)

8 years agoDO NOT MERGE: Use GregorianCalendar.add() when searching for next alarm.
Dan Sandler [Tue, 29 Dec 2015 20:45:39 +0000 (15:45 -0500)]
DO NOT MERGE: Use GregorianCalendar.add() when searching for next alarm.

Never attribute to malice that which is adequately explained
by a bug, particularly one involving date math.

Bug: 26326394
Change-Id: I3483ac102c678a8852565c8ea94c06e19b3f26d8
(cherry picked from commit 8d9aea8a1870ad83d9eccba1068a1685da5e96d0)

8 years agoCheck permissions on getDeviceId.
Robert Greenwalt [Fri, 4 Dec 2015 19:51:49 +0000 (11:51 -0800)]
Check permissions on getDeviceId.

This needs the package name passed in, so the aidl changes.

bug:25778215
Change-Id: I72f3456a2774a7ad5104424daea9e046ee9c6360

8 years agomerge in mnc-mr1-release history after reset to mnc-dr-dev
The Android Automerger [Thu, 17 Dec 2015 21:08:37 +0000 (13:08 -0800)]
merge in mnc-mr1-release history after reset to mnc-dr-dev

8 years agomerge in mnc-mr1-release history after reset to mnc-dr-dev
The Android Automerger [Tue, 15 Dec 2015 20:54:59 +0000 (12:54 -0800)]
merge in mnc-mr1-release history after reset to mnc-dr-dev

8 years agoDO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
Andy Hung [Tue, 1 Dec 2015 00:09:55 +0000 (16:09 -0800)]
DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread

Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
(cherry picked from commit 0275a982abecee683f16c827d405eafe51fb67ae)

8 years agoDO NOT MERGE Ensure that the device is provisioned before showing Recents.
Winson [Wed, 4 Nov 2015 22:24:43 +0000 (14:24 -0800)]
DO NOT MERGE Ensure that the device is provisioned before showing Recents.

Bug: 25476219

Change-Id: Ibbe621748f7275f8c1ccded84612ca16292559eb

8 years agoDon't allow contact sharing by default for device not recognized as carkit.
Sanket Padawe [Wed, 11 Nov 2015 23:01:35 +0000 (15:01 -0800)]
Don't allow contact sharing by default for device not recognized as carkit.

+ Don't allow contact sharing by default for devices not recognized
as carkit at pair time.

Bug: 23607427
Change-Id: If6babb10117ba7ee5008a4a29450a7cb981bea4a

8 years agoRevert "Fix race condition when setting default ringtones"
Ian Pedowitz [Wed, 11 Nov 2015 21:38:04 +0000 (21:38 +0000)]
Revert "Fix race condition when setting default ringtones"

This reverts commit f2cb9341ff864e6d9cc6797857665b2281643a74.

Change-Id: I151972052aea47bf8c6823eb8bbf8161c5a7a4f0

8 years agoFix race condition when setting default ringtones
Marco Nelissen [Fri, 6 Nov 2015 00:44:52 +0000 (16:44 -0800)]
Fix race condition when setting default ringtones

If the device was powered off during first boot, after media scanner
inserted some entries but before the default ringtone settings were
set (or committed to disk), the default settings would not be set
on subsequent boots.

Bug: 18625739
Bug: 22349910
Change-Id: Iff07da59a9c6d53bf2950bd107ee74d02b7f48d6

8 years agoBlock directory selection in openable modes.
Jeff Sharkey [Fri, 6 Nov 2015 17:16:22 +0000 (09:16 -0800)]
Block directory selection in openable modes.

When picking documents to return to apps requesting CATEGORY_OPENABLE
we can't let the user select directories.

Bug: 25455200
Change-Id: I8076883ee5b019eab4d2adb841952865f21e413e

8 years agoKick movement preconditions onto handler thread.
Jeff Sharkey [Thu, 5 Nov 2015 18:00:05 +0000 (10:00 -0800)]
Kick movement preconditions onto handler thread.

The bulk of package moving already occurs on the handler thread,
but one of the precondition steps requires that we make an installd
call to calculate disk space of the app.  If there was already
another long-running installd call going on, we could end up ANR'ing
the caller.

Since movePackage() is already designed to return a moveId and go
async, we can push all the precondition steps onto the handler thread
to prevent the ANR.

Bug: 25490003
Change-Id: I62d555c23bbf81b791f6f4cabc40c3d64c580cf8

8 years agoRevert "Remove -ffast-math from libhwui makefile"
Chris Craik [Thu, 5 Nov 2015 17:58:28 +0000 (17:58 +0000)]
Revert "Remove -ffast-math from libhwui makefile"

This reverts commit e02ec7c37a92fd63748a610bac6a23d0409788cf.

Change-Id: Iea7fadf04c4ffa62be28f783342ae749f89bf931

8 years agoWhen the incoming light source is invalid, don't generate any shadow
Teng-Hui Zhu [Thu, 5 Nov 2015 00:57:53 +0000 (16:57 -0800)]
When the incoming light source is invalid, don't generate any shadow

b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507

8 years agoEarly return when the scale is 0.
Teng-Hui Zhu [Thu, 1 Oct 2015 23:49:16 +0000 (16:49 -0700)]
Early return when the scale is 0.

b/24534579

Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
(cherry picked from commit 8d0ec389531d071529fb0a800f10733b057205d9)

8 years agoRemove -ffast-math from libhwui makefile
Chris Craik [Wed, 4 Nov 2015 18:12:28 +0000 (10:12 -0800)]
Remove -ffast-math from libhwui makefile

bug:25417885

Change-Id: I8244bd28c2d46fc449398b9bf5104bf7cbaded8a

8 years agoRevert "Use clang for libhwui"
John Reck [Wed, 4 Nov 2015 15:21:35 +0000 (15:21 +0000)]
Revert "Use clang for libhwui"

Bug 25462107

This reverts commit d354fd2c66855d116440eb4c936317f124241225.

Change-Id: Ib7c50b5becf247f837f3cc20f9128d9411d22563

8 years agoConvert ashmem bitmap thresholds to constants.
Riley Andrews [Wed, 4 Nov 2015 07:36:52 +0000 (23:36 -0800)]
Convert ashmem bitmap thresholds to constants.

Bug 25256717

Change-Id: I23e2795ef8798d83bf60dcbd6ff2e7093fcaa9b0
Signed-off-by: Riley Andrews <riandrews@google.com>
8 years agoUse clang for libhwui
Chris Craik [Tue, 3 Nov 2015 18:33:34 +0000 (10:33 -0800)]
Use clang for libhwui

bug:25417885

Change-Id: I0ef8034d79ba3682925e3c2a4b7ccd833fd4f156

8 years agoLimit persistent ashmem backed fds to a minimum of 128kB.
Riley Andrews [Mon, 2 Nov 2015 07:36:04 +0000 (23:36 -0800)]
Limit persistent ashmem backed fds to a minimum of 128kB.

Bug 25256717

Change-Id: Ieb356006df0a6545b89de44d3d8fd4b46312b3b8
Signed-off-by: Riley Andrews <riandrews@google.com>
8 years agoFix issue #25357209: Could not send SMS or MMS messages, had to reboot
Dianne Hackborn [Mon, 2 Nov 2015 21:43:29 +0000 (13:43 -0800)]
Fix issue #25357209: Could not send SMS or MMS messages, had to reboot

I think what probably happened is that since we only report an app
going in to the "interaction" state as an interaction event to usage
stats, apps that sit around in that state forever will only see one
interaction at the start and never again.  So usage stats could start
thinking they are idle.

Fix this by having the activity manager report an interaction event
for such long running applications at least once a day.

Also, because it is correct and for paranoia by protected us another
way, system uids should never go in to standby.

Change-Id: I8a3805bfca86cbe78560488a649ecd07427da99a

8 years agoFix a crash while printing ICCID because of alphabets in UICC.
Sanket Padawe [Mon, 2 Nov 2015 23:45:18 +0000 (15:45 -0800)]
Fix a crash while printing ICCID because of alphabets in UICC.

Bug: 25401769
Change-Id: Ieda058817b8d3cb4b1696fd9932bd0f10da55573

8 years agoFixed a bug where the panel could get stuck closing
Selim Cinek [Mon, 2 Nov 2015 21:42:58 +0000 (13:42 -0800)]
Fixed a bug where the panel could get stuck closing

When mClosing was set even though the panel was not
expanding, the variable was never reset leading to
bad states like the notification shade not updating,
people missing calls and similar bad bugs.

Bug: 25338991
Change-Id: I4362fda257770c98c5f9ba75a5622b14f74dc5ae

8 years agoImprove comment on EXTRA_CALL_RAT_TYPE.
Tyler Gunn [Mon, 2 Nov 2015 19:24:57 +0000 (11:24 -0800)]
Improve comment on EXTRA_CALL_RAT_TYPE.

Adding comments to EXTRA_CALL_RAT_TYPE to make it clear what it is used
for, and what values are expected.

Bug: 20144385
Change-Id: I248aca61abc8a57d7aeef650e48cc498e41c859b

8 years agoNetworkTimeUpdateService: Grab a wakelock when manipulating system time
Thierry Strudel [Thu, 29 Oct 2015 21:40:29 +0000 (14:40 -0700)]
NetworkTimeUpdateService: Grab a wakelock when manipulating system time

Bug: 24986869
Change-Id: Iab4e5ce6be0b5279ce85f868037ba256ee62c0ac
Signed-off-by: Thierry Strudel <tstrudel@google.com>
8 years agoDon't try overriding system fixed permissions on install
Svet Ganov [Mon, 2 Nov 2015 17:32:01 +0000 (09:32 -0800)]
Don't try overriding system fixed permissions on install

bug:25397466

Change-Id: Ie92ec000a94b757178ddfdd9384407535f4af9db

8 years agoPackageSettingBase needs to copy volume UUID.
Jeff Sharkey [Sat, 31 Oct 2015 20:58:54 +0000 (13:58 -0700)]
PackageSettingBase needs to copy volume UUID.

When copying all fields from one PackageSettingBase to another, we
also need to copy volumeUuid, which had previously been missed.

Without this, packages using sharedUserId that are installed on
adopted storage devices will be destroyed, since after reboot we
think they actually belong on internal storage (where volumeUuid is
null).

Bug: 25334169
Change-Id: I223361bd1e19e7d5dd78626682ac7c5cbecb9fa1

8 years agoHandle "uninstalled" apps when pruning app-ops.
Jeff Sharkey [Fri, 30 Oct 2015 02:00:44 +0000 (19:00 -0700)]
Handle "uninstalled" apps when pruning app-ops.

During system boot, we prune app-ops belonging to apps that have
been uninstalled.  However, apps installed on adopted storage devices
haven't been scanned at this point, so they appear to be uninstalled.

To avoid pruning app-ops for these apps, we need a getPackageUid()
variant that also considers "uninstalled" apps for which we still
have PackageSetting values.

Bug: 25206071
Change-Id: I1820f674d45c5ddc1c5f10ed7d859e7025005e28

8 years agoIMS: Support For Per-Call RAT Info
Omkar Kolangade [Thu, 29 Oct 2015 22:06:27 +0000 (15:06 -0700)]
IMS: Support For Per-Call RAT Info

Adding the extra key that will be used to
propagate RAT information for each call via
call extras. The key is used in IMS Service.

Bug: 20144385
Change-Id: Ia7ca81d661afb579fd25315036c43489b1dca50d

8 years agoAllow verifier to grant permissions
Svetoslav [Fri, 30 Oct 2015 00:00:06 +0000 (17:00 -0700)]
Allow verifier to grant permissions

bug:25329324

Change-Id: I2ac01a983ad812df7725a0499a8d9b470a7ea481

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Thu, 29 Oct 2015 19:27:09 +0000 (12:27 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 25319151
Change-Id: I4170f31d992d23a365c98fe5e799a31ef48f17bd

8 years agoGet rid of getTypesVisibleToCaller log spam.
Carlos Valdivia [Thu, 29 Oct 2015 23:41:21 +0000 (16:41 -0700)]
Get rid of getTypesVisibleToCaller log spam.

Bug: 25062620
Change-Id: Ia3080c501a288522a5b1de88d50f365357418ba8

8 years agoUsbDeviceManager: set mUsbDataUnlocked=false on user switch
Nick Kralevich [Thu, 29 Oct 2015 19:45:23 +0000 (12:45 -0700)]
UsbDeviceManager: set mUsbDataUnlocked=false on user switch

Make sure access to MTP data is relocked when a user switch occurs.

Bug: 25288494
Change-Id: I69dafc7f51b847f4dba1993a85fb1a51df1a5e37

8 years agoDon't crash if a DHCP server doesn't send the server ID option.
Lorenzo Colitti [Thu, 29 Oct 2015 06:21:54 +0000 (15:21 +0900)]
Don't crash if a DHCP server doesn't send the server ID option.

This violates a MUST in RFC2131, but apparently some
implementations don't know or care.

Bug: 25343517
Change-Id: I80459b58ffe231e7ed64e77bafa157a96b745149

8 years agoMerge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev
Svetoslav Ganov [Thu, 29 Oct 2015 01:10:46 +0000 (01:10 +0000)]
Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr-dev
Geoff Mendal [Wed, 28 Oct 2015 14:38:11 +0000 (14:38 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 28 Oct 2015 14:37:31 +0000 (07:37 -0700)]
Import translations. DO NOT MERGE

Change-Id: Id9e2298a05893e3769f0e62bcda5fe70c058d11a
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 28 Oct 2015 13:59:45 +0000 (06:59 -0700)]
Import translations. DO NOT MERGE

Change-Id: If7c4ccf382e85f88a4fac586ca870068d8219974
Auto-generated-cl: translation import

8 years agoMake SYSTEM_ALERT_WINDOW development permission
Svetoslav [Tue, 27 Oct 2015 22:22:39 +0000 (15:22 -0700)]
Make SYSTEM_ALERT_WINDOW development permission

bug:25329324

Change-Id: I0086464846bab9424764dd0d726692d96a0f1207

8 years agoMerge "Petites fautes." into mnc-dr-dev
Daniel Sandler [Tue, 27 Oct 2015 19:51:31 +0000 (19:51 +0000)]
Merge "Petites fautes." into mnc-dr-dev

8 years agoPetites fautes.
Dan Sandler [Tue, 27 Oct 2015 17:42:55 +0000 (13:42 -0400)]
Petites fautes.

Bug: 25308153
Change-Id: I62ffe080e3f36eb685cdc06d8c106d32e18092ed

8 years agoFix issue #25289999: Lower device idle alarm limit to 10 mins.
Dianne Hackborn [Tue, 27 Oct 2015 00:51:57 +0000 (17:51 -0700)]
Fix issue #25289999: Lower device idle alarm limit to 10 mins.

This helps with some cases where perisistent network connections
need a more frequent keep alive signal.  Actually make it 9
minutes to ensure that things needing a 10 minute cycle will
execute within that time.

Change-Id: Ife8c7b7f7f82b108d5a6c1624bd6115e6087c3be

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr-dev
Geoff Mendal [Mon, 26 Oct 2015 16:28:12 +0000 (16:28 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 26 Oct 2015 16:27:14 +0000 (11:27 -0500)]
Import translations. DO NOT MERGE

Change-Id: I0383c1869f289a39ca3db684712dbd812e626e9a
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 26 Oct 2015 14:17:06 +0000 (07:17 -0700)]
Import translations. DO NOT MERGE

Change-Id: I9bf90d06113d8333bed3eec1c65ed799a785fb63
Auto-generated-cl: translation import

8 years agoMerge "Prevent recents from coming up when in SUW" into mnc-dr-dev
Puneet Kumar [Sat, 24 Oct 2015 15:20:28 +0000 (15:20 +0000)]
Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev

8 years agoPrevent recents from coming up when in SUW
Michael Wright [Sat, 24 Oct 2015 12:24:15 +0000 (13:24 +0100)]
Prevent recents from coming up when in SUW

Bug: 25229538
Change-Id: I141c4eb928a5ce7f9858922862fe3dc1d3a33a90

8 years agoDelay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a...
Dan Sandler [Sat, 24 Oct 2015 00:45:01 +0000 (00:45 +0000)]
Delay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a  -s ours am: 410bea181b am: 511357c39b am: 7e16b2e8f5  -s ours
am: e68e70d509

* commit 'e68e70d509e2a0ba1c8bd56c231bf1c6cc3da967':
  Delay hiding the cast icon for 3 seconds. DO NOT MERGE

8 years agoDelay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a...
Dan Sandler [Sat, 24 Oct 2015 00:33:48 +0000 (00:33 +0000)]
Delay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a  -s ours am: 410bea181b am: 511357c39b
am: 7e16b2e8f5  -s ours

* commit '7e16b2e8f5b74d29711d330f6982d8ed12c3f4db':
  Delay hiding the cast icon for 3 seconds. DO NOT MERGE