Commit Graph

5269 Commits

Author SHA1 Message Date
Narayan Kamath
6e80c19a48 StrictMode: Add support for warning on non SDK API usage.
Adds new API methods to enable and disable these warnings.

(cherry-picked from commit ad1b2a9cc1)

Bug: 73896556
Test: StrictModeTest
Change-Id: I096ce4c355c79cde1b98c3f48d392cd0b2ea5d98
2018-04-03 13:10:13 +01:00
Jeff Sharkey
e827123c68 Merge "Handle public volumes and otherwise invalid UUIDs." into pi-dev am: ee1661f7cd
am: b407389280

Change-Id: I5f11191b063ab17e6d5a3a9edf6cc8cf34272638
2018-03-30 10:55:39 +00:00
Jeff Sharkey
b407389280 Merge "Handle public volumes and otherwise invalid UUIDs." into pi-dev
am: ee1661f7cd

Change-Id: Ibaed0d6289ce9312f2acc2701cea9cee90740492
2018-03-30 10:31:32 +00:00
Jeff Sharkey
b2e66f3257 Merge "Only return internal path when not visible." into pi-dev am: 2254fe2e04
am: 70c93a28e0

Change-Id: I4960cd422e2039fe4451aa750f1b7d8f3ffb04c7
2018-03-30 00:07:41 +00:00
TreeHugger Robot
ee1661f7cd Merge "Handle public volumes and otherwise invalid UUIDs." into pi-dev 2018-03-29 23:33:18 +00:00
Jeff Sharkey
70c93a28e0 Merge "Only return internal path when not visible." into pi-dev
am: 2254fe2e04

Change-Id: I7e90be19432f3ac8e0ec9b878f31416dca6c1e4a
2018-03-29 23:03:26 +00:00
TreeHugger Robot
2254fe2e04 Merge "Only return internal path when not visible." into pi-dev 2018-03-29 22:16:32 +00:00
Jeff Sharkey
18f325012d Handle public volumes and otherwise invalid UUIDs.
Public volumes have short UUIDs (which aren't valid 128-bit UUIDs),
so we can't pass them around.  Even if they were valid UUIDs, we
don't handle clearing cached data on them, and they most likely
don't support fallocate(), so don't match them.

Test: manual
Bug: 74132243
Change-Id: Ib855eb869a86392e96ced94a9926c0b32b87e57e
2018-03-29 14:29:29 -06:00
Jeff Sharkey
18bbed5865 Only return internal path when not visible.
When a volume is visible (wrapped in sdcardfs), we need all file
operations to go through that sdcardfs layer to keep it in sync.

Test: manual
Bug: 73922090
Change-Id: I14f1f4743f470a6cbc78030e1ea8411f9910a5b9
2018-03-29 14:20:50 -06:00
Makoto Onuki
b71ec92c0e Merge "Root (uid=0) should be core. Fix UserHandle.isCore()." into pi-dev am: f3faf62adc
am: aad3482cc4

Change-Id: I8d24943abd41120d5aa73f369fc64b9d89e5fd30
2018-03-29 18:11:44 +00:00
Makoto Onuki
aad3482cc4 Merge "Root (uid=0) should be core. Fix UserHandle.isCore()." into pi-dev
am: f3faf62adc

Change-Id: Ie4af59f3892be89adfcdbe9a0cb02e92aab2c8b2
2018-03-29 17:53:30 +00:00
Chenjie Yu
255aacf801 Merge "Fix StatsCompanionService pull on bucket ends" into pi-dev am: 925a04b775
am: 985270a6a0

Change-Id: I12709668687d1646a1db949b612114af78311592
2018-03-29 17:52:34 +00:00
Chenjie Yu
985270a6a0 Merge "Fix StatsCompanionService pull on bucket ends" into pi-dev
am: 925a04b775

Change-Id: I1aac27b4a83158b336e0fcff16a18a06ab310615
2018-03-29 17:33:18 +00:00
TreeHugger Robot
f3faf62adc Merge "Root (uid=0) should be core. Fix UserHandle.isCore()." into pi-dev 2018-03-29 17:17:23 +00:00
TreeHugger Robot
925a04b775 Merge "Fix StatsCompanionService pull on bucket ends" into pi-dev 2018-03-29 17:00:25 +00:00
Chenjie Yu
1a0a941c20 Fix StatsCompanionService pull on bucket ends
+ change StatsPullerManager internal time units to be consistent
+ use series of alarms for pullers, instead of use setRepeating

Bug: 76223345
Bug: 75970648
Test: cts test
Change-Id: I9e6ac0ce06541f5ceabd2a8fa444e13d40e36983
2018-03-29 00:11:13 -07:00
Chet Haase
92b7bc5fbe Merge "Add targetSdk check around new LinearLayout weighted measure behavior" 2018-03-29 01:24:17 +00:00
Makoto Onuki
cbc3ccec61 Root (uid=0) should be core. Fix UserHandle.isCore().
Bug: 77240427
Change-Id: I057e8f50370fb1cd74ff2ebdab41990a682cec6f
Fix: 77240427
Test: build & boot
Test: "am set-standby-bucket com.google.android.apps.docs 40" will override ACTIVE
2018-03-28 16:49:47 -07:00
David Pursell
57f25ad657 Merge "Merge "MessageQueue: explicitly remove FD event listeners." am: b43daf5f7b am: 040587641b" into pi-dev-plus-aosp
am: 1058f42271

Change-Id: I5093ca0d576473f490347ab4244af11a2835d23a
2018-03-28 22:16:24 +00:00
David Pursell
bea874b7fa Merge "MessageQueue: explicitly remove FD event listeners." am: b43daf5f7b
am: 040587641b

Change-Id: Ia4537ab0db75eabe8b3bf3fc07585a36769727f8
2018-03-28 20:59:26 +00:00
Pavel Grafov
c397f7bdfc Merge "Improve javadoc for DISALLOW_DEBUGGING_FEATURES." 2018-03-28 19:40:31 +00:00
Treehugger Robot
b43daf5f7b Merge "MessageQueue: explicitly remove FD event listeners." 2018-03-28 18:06:31 +00:00
Mathew Inwood
8faeab8735 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509

(cherry picked from commit 2c6f97d4c9)

Merged-In: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Change-Id: I7b590f272fdcfcda5f18e216788ac34bc58beaed
2018-03-28 11:54:17 +01:00
Narayan Kamath
028ee699dc Merge "Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API." into pi-dev am: 77e0b7b821
am: 6a2e8e0106

Change-Id: I4d6211a1baabce7d24fac7e05ec6bf66f166d6c3
2018-03-28 09:13:07 +00:00
Narayan Kamath
6a2e8e0106 Merge "Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API." into pi-dev
am: 77e0b7b821

Change-Id: I8380a14b0862a8ec36b880c4e851120aa62d58e0
2018-03-28 09:02:51 +00:00
Narayan Kamath
77e0b7b821 Merge "Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API." into pi-dev 2018-03-28 08:43:08 +00:00
Dianne Hackborn
40eca65f1a Merge "Work on issue #74404949: Screen state usage API" into pi-dev am: 00f3c4333e
am: 30181d3bc1

Change-Id: I4a3ee230b1ce30022f85e271d0f0708f73af4026
2018-03-28 01:04:17 +00:00
Dianne Hackborn
30181d3bc1 Merge "Work on issue #74404949: Screen state usage API" into pi-dev
am: 00f3c4333e

Change-Id: I3bff628d13f1089213edf84aa1feffd683b99cd7
2018-03-27 23:37:02 +00:00
Mathew Inwood
9075eac89f Merge "Merge "Configurable hidden API exemptions." am: 4b8285b907 am: 625aa8d33a" into pi-dev-plus-aosp
am: d1cbe1af4f

Change-Id: I2d2a2fc37ff32523f5bd0c92b1d8273b9b8e7c91
2018-03-27 23:28:03 +00:00
Mike Ma
6a48d99363 Merge "Track USB data link in batterystats" into pi-dev am: 3787f73198
am: 6a929dd0cf

Change-Id: I10472eeacc805aa09b4de8588a6779796f3c0926
2018-03-27 22:57:30 +00:00
Jeff Sharkey
ea5682f52d Merge changes Iba4e52c2,I81160755 into pi-dev am: 5681efd1af
am: bbe24ee1bb

Change-Id: I6d7262aedfea7e1635db43a82e8200210a97639e
2018-03-27 22:50:33 +00:00
Dianne Hackborn
00f3c4333e Merge "Work on issue #74404949: Screen state usage API" into pi-dev 2018-03-27 22:40:51 +00:00
Mathew Inwood
c6224bfabb Merge "Configurable hidden API exemptions." am: 4b8285b907
am: 625aa8d33a

Change-Id: I3ead821be36e65c5d6abf7b40ecb3171949656f9
2018-03-27 22:19:51 +00:00
Mike Ma
6a929dd0cf Merge "Track USB data link in batterystats" into pi-dev
am: 3787f73198

Change-Id: Id0d95a1516a21d9c7e9739a1237558f47f3d2e9c
2018-03-27 21:43:23 +00:00
Jeff Sharkey
bbe24ee1bb Merge changes Iba4e52c2,I81160755 into pi-dev
am: 5681efd1af

Change-Id: I2352404cdc27e75a510eb8f999679cfe67aa7ec6
2018-03-27 21:31:19 +00:00
TreeHugger Robot
3787f73198 Merge "Track USB data link in batterystats" into pi-dev 2018-03-27 20:52:57 +00:00
Treehugger Robot
4b8285b907 Merge "Configurable hidden API exemptions." 2018-03-27 20:49:45 +00:00
TreeHugger Robot
5681efd1af Merge changes Iba4e52c2,I81160755 into pi-dev
* changes:
  Public volumes only browsable by mounting user.
  Public volumes are only visible to mounted user.
2018-03-27 20:28:31 +00:00
Dianne Hackborn
ced54398cc Work on issue #74404949: Screen state usage API
Add usage stats tracking of screen time.  There are two new
events, one for when the device is an interactive state, the
other for when it is non-interactive.  Also add a whole new
usage stats API for retrieving aggregated data that is associated
with general events, not particular packages.  In this case
it allows you to find the time the device spent interactive
and non-interactive and the count of the transitions in to
each of those states.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents

Change-Id: Ibe6d55e2aecb0c8519b1358644378ec5c7a4250d
2018-03-27 13:27:20 -07:00
Mike Ma
926a97cd3f Track USB data link in batterystats
Record USB data link state in addition to plug & charging state, since
modern USB controller can keep USB data link connected with minimum
current. Device is not acutally charging at those times.
Test: manual
Fixes: 76209292

Change-Id: I0710d547399a631d594488a524682ccc32a25ce6
2018-03-27 12:05:48 -07:00
Jeff Sharkey
0000d8aef8 Public volumes only browsable by mounting user.
We can't browse public volumes mounted for a different user, so don't
return an Intent claiming that we can, since it'll just fail.

Test: manual
Bug: 74056525
Change-Id: Iba4e52c2672258b981d2912875e55949bb35e310
2018-03-27 11:35:35 -06:00
Jeff Sharkey
d1257462c2 Public volumes are only visible to mounted user.
New lower-level security fixes are blocking access, so make these
upper-level APIs reflect those properties.

Test: manual
Bug: 68857050
Change-Id: I81160755180f4f419d8577ea1f18a6ece10c560c
2018-03-27 11:30:55 -06:00
Narayan Kamath
91c361dcbb Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API.
It's not required. Also, amend the javadoc to reflect the current
state of affairs.

Bug: 76418791
Test: make update-api && make checkapi
Change-Id: I7d68a0ab33967679af8cfc4161c8283d4471b561
2018-03-27 16:47:55 +00:00
Mathew Inwood
2c6f97d4c9 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Ib1245b69da4dac50c6968f1be62f1a74591dc433
2018-03-27 10:51:10 +01:00
Jeff Sharkey
6b2753c027 Merge "Report final progress when finished copying." into pi-dev am: 01f2ff1aa4
am: 190d3520af

Change-Id: I8cbdc28d8a72d4d3a9ef7a92e2ba6ea95c3618dc
2018-03-27 04:28:07 +00:00
Jeff Sharkey
190d3520af Merge "Report final progress when finished copying." into pi-dev
am: 01f2ff1aa4

Change-Id: I1421da9d91c172fb9afff1e5960a9c86ff2d794d
2018-03-27 03:45:07 +00:00
Jeff Sharkey
549baaa41f Merge "API council requested tweaks to SystemClock." into pi-dev am: 0bff5a6dfa
am: de5b4f3c99

Change-Id: Ic19a334c177c4eaeb3882479f6e5fcfb8644a0fb
2018-03-27 03:29:15 +00:00
Jeff Sharkey
de5b4f3c99 Merge "API council requested tweaks to SystemClock." into pi-dev
am: 0bff5a6dfa

Change-Id: I5b7d6247342eaddb8024842cecfc516ae2aa5fcc
2018-03-27 03:04:34 +00:00
TreeHugger Robot
01f2ff1aa4 Merge "Report final progress when finished copying." into pi-dev 2018-03-27 02:52:26 +00:00
TreeHugger Robot
0bff5a6dfa Merge "API council requested tweaks to SystemClock." into pi-dev 2018-03-27 02:40:24 +00:00