71690 Commits

Author SHA1 Message Date
Dianne Hackborn
692a244bff Fix build.
Change-Id: Icdf6fa14e53a1c030d0d90205d3bf2d7610b6196
2015-07-31 10:35:34 -07:00
Dianne Hackborn
c1836bb0f1 Merge "Change MNC codename to just M." into mnc-dev 2015-07-31 17:11:58 +00:00
Lorenzo Colitti
496a9d269b Merge "Stop supporting legacy ConnectivityManager routing methods in M." into mnc-dev 2015-07-31 05:17:08 +00:00
Dave Langemak
02565c3622 Merge changes from topic 'fix-notification-inflation-2' into mnc-dev
* changes:
  Make DateTimeView more robust to weird contexts.
  Make the RemoteViews context safe for Icons.
2015-07-31 02:52:30 +00:00
Dan Sandler
4b67713709 Make DateTimeView more robust to weird contexts.
In particular, some clients (*ahem* SystemUI) have been
known to inflate RemoteViews with unusual derived contexts
that may not have valid application contexts. DateTimeView
can now resist this.

Bug: 22852700
Change-Id: I5e91ae0e66859f5f5efd7b19c0ae6dfbc26bcc54
2015-07-30 22:33:12 -04:00
Dan Sandler
706274f7ff Make the RemoteViews context safe for Icons.
Icon needs the RemoteViews' internal context to reflect not
just the Resources of the originating application, but its
package name as well.

Bug: 22840771
Bug: 22852700
Change-Id: I1164cd38d99283982b00daadcf927c7cf63539b3
2015-07-30 22:32:54 -04:00
Geoff Mendal
e0217b1a9a Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 22826906
Change-Id: If1cb05eb42e8e5bd789cdb257dfc3498e4479890
2015-07-30 19:12:14 -07:00
Lorenzo Colitti
ffc42b0b7b Stop supporting legacy ConnectivityManager routing methods in M.
The methods startUsingNetworkFeature, stopUsingNetworkFeature and
requestRouteToHost were @removed in all the M preview builds, but
internal and external developers have noted that this imposes
additional burden for applications that need to work across
multiple platform versions because it causes compile-time errors.

We switched from @removed back to @deprecated to avoid these
problems. In order to effectively deprecate these methods, which
are error-prone and insecure, make them throw
UnsupportedOperationException if the app's target SDK is M or
above.

Because there are still one or two places in system code that use
these APIs, exempt Process.SYSTEM_UID and the OMA-DM client from
the check for now.

Bug: 22728205
Change-Id: I790bd32f3aa8067cbb625962a209bb9232f4b58c
2015-07-31 11:08:27 +09:00
Adam Lesinski
00f7cb924e Merge "BatteryStats: include mobile radio active count and unknown time in checkin" into mnc-dev 2015-07-30 23:50:27 +00:00
Adam Lesinski
782327bde7 BatteryStats: include mobile radio active count and unknown time in checkin
These are important values to help diagnose modem related wakeup issues.

Bug:22803686
Bug:22857991
Change-Id: Ie0164ebd194567bc10d1165d671a583674a39829
2015-07-30 23:50:10 +00:00
Carlos Valdivia
26ae600b5f Merge "Permissions: GET_ACCOUNTS permission cleanup" into mnc-dev 2015-07-30 21:58:16 +00:00
Fyodor Kupolov
4988378cd0 Merge "Introduced android.permission.PEERS_MAC_ADDRESS permission" into mnc-dev 2015-07-30 20:50:04 +00:00
Simranjit Kohli
964a41214d Merge "[Improve docs for AccountManager] Currently, the docs for AccountManager are somewhat misleading and may cause developer errors. To avoid them, we are properly documenting it." into mnc-dev 2015-07-30 17:09:44 +00:00
Alan Viverette
559daf7a74 Merge "Include non-zero dimension views in excess space calculation" into mnc-dev 2015-07-30 17:02:45 +00:00
Carlos Valdivia
e7ed827a10 Permissions: GET_ACCOUNTS permission cleanup
First, getAccounts*() will now return all available accounts depending
on both GET_ACCOUNTS grants and signature matching. This is different
from before where a caller of getAccounts() would need GET_ACCOUNTS to
get any accounts, but if that same caller called getAccountsByType, they
might have gotten back accounts if they shared a signature with the same
developer.

Second, cleaned up some NPEs and javadoc.

This change was motivated by progress on the cts tests.

Change-Id: I2f36226780e074fdf58214b46de3b79d8319ace1
2015-07-30 09:18:53 -07:00
Dan Sandler
7bd8e6a8f2 DateTimeView: don't assume you have an ApplicationContext.
Bug: 22840771
Change-Id: I3be6369936f90e9ce4e61a59ea81b0d3408a0f99
2015-07-30 11:59:30 -04:00
Alan Viverette
da2f304409 Include non-zero dimension views in excess space calculation
Bug: 22840778
Change-Id: Iba44c59bbaa48f63b26f342e0510b4c421e8748b
2015-07-30 11:44:12 -04:00
Alan Viverette
c1d5b6c18c Merge "Move padding from navigation and overflow icons to Toolbar" into mnc-dev 2015-07-30 14:50:07 +00:00
Alan Viverette
fb61bb5028 Move padding from navigation and overflow icons to Toolbar
Also removes unused default_padding_material dimension.

Bug: 18482784
Change-Id: If294f61391bc76034feb8222d74f40d6b29857c5
2015-07-30 10:17:39 -04:00
Daniel Sandler
bbe1682b16 Merge changes from topic 'fix-media-notifications' into mnc-dev
* changes:
  Fully support Icons in Notification actions.
  Fix media notification action icons.
2015-07-30 02:57:06 +00:00
Simranjit Singh Kohli
210baceaa1 [Improve docs for AccountManager]
Currently, the docs for AccountManager are somewhat misleading and may
cause developer errors. To avoid them, we are properly documenting it.

Bug: 21924096
Change-Id: If775a54a09219b0f1623d2ff903085b9d12aa863
2015-07-29 19:43:16 -07:00
Paul Jensen
a991c66c12 Merge "Fix missing onLost NetworkCallbacks when network loses capability" into mnc-dev 2015-07-30 02:10:50 +00:00
Dianne Hackborn
8d3a67a8d4 Merge "More maybe fix issue #22765972: Binder transactions running out..." into mnc-dev 2015-07-30 01:32:09 +00:00
Dianne Hackborn
6b42bc0e21 More maybe fix issue #22765972: Binder transactions running out...
...of address space causing package manager to fail

Make sure to flush binder commands when done with an async task.

Change-Id: I9f171add7051587ab854226b97a12c7e1844ad5d
2015-07-29 17:58:33 -07:00
Billy Lau
a6706627a9 Merge "Bug: 21589105 Rescope WRITE_SETTINGS permission (framework services perm check changes)" into mnc-dev 2015-07-29 22:42:27 +00:00
Billy Lau
6ad2d66072 Bug: 21589105 Rescope WRITE_SETTINGS permission (framework services perm check
changes)

AppOpsManager:
Changed the default operating mode for WRITE_SETTINGS to MODE_DEFAULT from
MODE_ALLOWED.

packages/SettingsProvider:
We no longer do static permission checks for WRITE_SETTINGS in early checks and
defer that to app op when MODE_DEFAULT is returned. For some operations,
checking against WRITE_SECURE_SETTINGS is sufficient.

ActivityManagerService & PowerManagerService:
Incorporated app op checks and handled the MODE_DEFAULT case.

provider/Settings:
Added helper function to do checks on whether app ops protected operations
can be performed by a caller. This includes checks for WRITE_SETTINGS and
SYSTEM_ALERT_WINDOW.
Also added a public API (with javadocs) for apps to query if they can modify
system settings.
Changed the javadocs description for ACTION_MANAGE_WRITE_SETTINGS and
ACTION_MANAGE_OVERLAY_PERMISSION.
Added public API (with javadocs) for apps to query whether they can draw overlays or not,
and also javadocs description on how to use that check.

Change-Id: I7b651fe8af836c2074defdbd6acfec3f32acdbe9
2015-07-29 23:21:26 +01:00
Dianne Hackborn
0e3de6caca Change MNC codename to just M.
Change-Id: I4281d200ff6560791c47cf9073ceea1cb509361e
2015-07-29 15:20:21 -07:00
Dan Sandler
25ffc7ad95 Accessibility: Read the time correctly in quick settings.
The problem is that, for 12-hour locales, we cut the "a"
part of the time format out to show it in a separate
TextView so it can be animated independently of the actual
time. Unfortunately, while TTS is smart enough to pronounce
"1:15 AM" as /wʌn fɪftin eɪ ɛm/, "AM" on its own looks like
the English word "am" and is pronounced /æm/.

To fix this, a TextClock must be able to accept separate
formats for its content description than its presentation.
With this capability we can place the complete 12-hour time
format (including am/pm) in one of the views and suppress
the other one, so that the utterance creates an identical
experience to visual inspection: "1:15 AM" for all users.

Bug: 21718000
Change-Id: Ic9920d71ae4d4ad41ba86d7bd96f9a19b07e2108
2015-07-29 22:19:52 +00:00
Robert Greenwalt
771d210ab2 Merge "Revert "DO NOT MERGE Enhance local log."" into mnc-dev 2015-07-29 22:00:40 +00:00
Adrian Roos
e2cd84196e Merge "Fix pattern lock for accessibility" into mnc-dev 2015-07-29 21:23:25 +00:00
Adrian Roos
d2def94639 Fix pattern lock for accessibility
- remove the content description in Keyguard
- only show virtual views when pattern is in progress
- add a content description when the pattern is not in progress

Bug: 22646748
Change-Id: Id32a37c4c74c82b547cee8861b2856fa0a08c41c
2015-07-29 14:13:53 -07:00
Robert Greenwalt
374d91df94 Revert "DO NOT MERGE Enhance local log."
This reverts commit dd6f8441292d30cc51c1e32bb27fab8dfb791f90.

bug:22632129
Change-Id: Ibd4b9c35b66cb7d877085bc010fde45a682ba34f
2015-07-29 14:11:23 -07:00
Alan Viverette
93184eef41 Merge "DO NOT MERGE: Don't backup night mode setting" into mnc-dev 2015-07-29 20:46:08 +00:00
Adrian Roos
726d47b771 Merge "Fix and deprecate lock pattern related settings" into mnc-dev 2015-07-29 20:39:27 +00:00
Alan Viverette
ec9bea7eeb DO NOT MERGE: Don't backup night mode setting
Bug: 22824325
Change-Id: I7a244f416e1aa258735eea09858e3c202e8c8945
2015-07-29 16:22:03 -04:00
Alan Viverette
47a74e7e2b Merge "Ensure maxHeight is at least 0 during measureChildHorizontal()" into mnc-dev 2015-07-29 20:02:41 +00:00
Alan Viverette
5c380efa2c Merge "Always distribute excess space in LinearLayout measurement" into mnc-dev 2015-07-29 20:01:52 +00:00
Jeff Sharkey
b86048dab3 Merge "Always return content Uri for downloads." into mnc-dev 2015-07-29 19:59:36 +00:00
Alan Viverette
7a40d21d89 Ensure maxHeight is at least 0 during measureChildHorizontal()
Bug: 22613599
Change-Id: I11f70ed1f7221874bef0f00f006e0ae294c4bdfa
2015-07-29 15:55:20 -04:00
Alan Viverette
4fabc02158 Always distribute excess space in LinearLayout measurement
Previously, excess space was added to existing measured dimensions.
This consistently resulted in incorrect allocation of excess space,
since the delta already included the height of any measured children
rather than just the excess space itself.

This CL ensures that excess space is always distributed according to the
layout weights.

Bug: 22810327
Change-Id: I482a553c469169769cc40ab3d88b4a44023f3eb5
2015-07-29 15:53:53 -04:00
Raph Levien
c3cc344d12 Merge "Release text when finishing StaticLayout.Builder" into mnc-dev 2015-07-29 19:44:21 +00:00
Raph Levien
22ba7869f6 Release text when finishing StaticLayout.Builder
DynamicLayout reuses a StaticLayout.Builder object to avoid having to
allocate. There is a "finish" method that releases any expensive
internal state of the builder object, but it didn't release a
reference to the text object (which in turn may contain references to
lots of other things, especially if it's a Spannable).

This patch releases the text, as well as a few other arrays, at time
of finish.

Bug: 22822416
Change-Id: Icc8b6cd41a9a2d11689df7bd1b9f524c6524f706
2015-07-29 12:34:13 -07:00
Dan Sandler
912282e731 Fully support Icons in Notification actions.
RemoteViews now allows Icons as TextView compound
drawables in RemoteViews, but not yet as public API.

Bug: 22600607
Change-Id: I986a0ce3bede09746f0b121884184679f39a79f5
2015-07-29 14:18:38 -04:00
Christine Hallstrom
a42e681651 Merge "Change NTP polling interval from 10 days to 24 hours." into mnc-dev 2015-07-29 17:59:23 +00:00
Svetoslav Ganov
9352af2a9e Merge "Remove dependencies on the package installer's package name" into mnc-dev 2015-07-29 17:54:23 +00:00
Dan Sandler
68079d54f3 Fix media notification action icons.
In addition to cleaning up some bare references to the icon
slot, we now apply updates to notification RemoteViews in
the context of the supplying app's package. This ensures we
can find the drawables inside any Icon objects that were
constructed without a proper package name, such as is the
case with Actions (because the builder and constructor are
Context-free and so don't know the package name).

This CL also makes clear what was previously only implied:
Non-resource action icons are not actually supported yet
since they can't be pushed to TextView compound drawables
using today's RemoteViews APIs. That will require an API
change.

Bug: 22600607
Change-Id: Ie6b88aed36e4db05be35f843ea3bc1898d4a5c96
2015-07-29 13:50:32 -04:00
Christine Hallstrom
defef96da0 Change NTP polling interval from 10 days to 24 hours.
Bug: 22820525
Change-Id: Ifb5da0a19854d751d00889e4c9d075e909414d62
2015-07-29 17:49:52 +00:00
Sailesh Nepal
6b96de8dae Merge "Default permissions for sim call manager" into mnc-dev 2015-07-29 17:39:37 +00:00
Jeff Sharkey
b11683ba62 Always return content Uri for downloads.
Now that we're relying more heavily on Uri permission grants between
apps, we should always return content:// Uris.

Bug: 22820206
Change-Id: Ie9603da09944dc594ea5dde2db04455f57d6f103
2015-07-29 10:22:30 -07:00
Dianne Hackborn
eda1cc50ce Merge "Work on issue #22765972: Binder transactions running out of address..." into mnc-dev 2015-07-29 17:05:58 +00:00