Commit Graph

3542 Commits

Author SHA1 Message Date
Yifan Hong
bf49821c39 android.os.VintfObject: add API for EDI.
Add APIs for EDI (extensive device information).

Test: CtsDeviceInfo
Bug: 28656227
Change-Id: I609d4f1f07e20717827ef024ff8cbe124d7e54a6
Merged-In: I609d4f1f07e20717827ef024ff8cbe124d7e54a6
2017-05-04 20:01:32 -07:00
Yifan Hong
4463d991be Add compatibility matrices to VintfObject.report()
Test: FrameworksCoreTests
Bug: 36814503
Change-Id: I27eaea136437afb2102581d410b657e810612a0a
Merged-In: I27eaea136437afb2102581d410b657e810612a0a
2017-05-04 20:00:30 -07:00
Tianjie Xu
2db2f6d265 Merge "Add error/cause code reporting for Non A/B OTA failures" 2017-05-03 17:34:29 +00:00
Tianjie Xu
223edeb272 Add error/cause code reporting for Non A/B OTA failures
Read and report the error_code & cause_code from last_install.

Bug: 36866437
Test: mma & observe the sysui event in logcat -b events
Change-Id: I5357861fc758e14ed3235bfc8cc76d7561ccea58
2017-05-02 23:02:11 -07:00
Treehugger Robot
4f8a375958 Merge "Add android.os.VintfRuntimeInfo" 2017-04-29 03:00:08 +00:00
Yifan Hong
1bda67369c Add android.os.VintfRuntimeInfo
This is the Java API for ::android::vintf::RuntimeInfo.
This will be used by CTS for device info report purposes.

Bug: 28656227
Test: cts-tradefed run cts -m CtsEdiHostTestCases --skip-preconditions
Change-Id: Id87c95a17e77d7ec1794a6f850de97edf9ae892d
2017-04-28 17:10:28 -07:00
Martijn Coenen
7c00639a68 Validate incoming data properly.
Make sure calls to readBuffer() and readEmbeddedBuffer()
get the correct size, parent and offset passed in, so
these can be validated by libhwbinder.

Modified HwBlob to take a length argument as well,
so it can be validated.

Bug: 30498700
Test: hidl_test, hidl_test_java, Youtube, Maps, Netflix, Camera
Change-Id: I28712db97ae29b46acfe952d3d92d1ce5f666a4d
Merged-In: I28712db97ae29b46acfe952d3d92d1ce5f666a4d
2017-04-27 16:24:26 -07:00
Robin Lee
53a122986d Merge "Remove unused network management RPCs" 2017-04-22 21:59:57 +00:00
Yifan Hong
4e01db8c12 Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:30 -07:00
Tobias Thierer
0ad48dc8aa Document the fact that StatFs.restat() and ctor can throw.
StatFs.restat() and the StatFs constructor can throw
IllegalArgumentException. This was not previously documented;
not all callers took this into account, for example:
   http://r.android.com/251290

This CL adds documentation to those methods. It also adds
comments to two of the callers.

Separately from this CL, we may in addition consider adding
new API StatFs.checkedRestat() and StatFs.checkedCreate()
or similar that throw IOException; we cannot change the
existing constructor and method since they are public.

Test: Checked that "make" still completed successfully.

Change-Id: I6a0b3cb7718939408937c61de7c3b000b948fa59
2017-04-05 20:52:04 +00:00
Tianjie Xu
022682a721 Merge "Report the temperature during an OTA update"
am: 47c7e7f41a

Change-Id: I3238939bd9535571de1532f34ca137eb3fec9dc2
2017-03-29 18:25:11 +00:00
Tianjie Xu
47c7e7f41a Merge "Report the temperature during an OTA update" 2017-03-29 18:16:46 +00:00
Calin Juravle
8a4afd3dad Merge changes from topic 'dex'
am: f665781c74

Change-Id: I31c202a56d8f92634cc1d5d84106e27cb8c23bfd
2017-03-29 01:27:37 +00:00
Calin Juravle
f665781c74 Merge changes from topic 'dex'
* changes:
  Compile secondary dex files according to REASON_BACKGROUND_DEXOPT
  Register secondary dex files for JIT profiling
  Move DexLoadReporter out of LoadedApk
  Set pm.BackgroundDexOptService as the source of true
  Add missing return in DexManager
  Update package use info when the app data is updated
2017-03-29 01:19:58 +00:00
Yifan Hong
75172f2909 Merge "Add HidlSupport.java for utility methods for HIDL."
am: 383391c5da

Change-Id: If68b94a2b38a7665a739f2792b8e0acefe5037c1
2017-03-29 00:39:58 +00:00
Treehugger Robot
383391c5da Merge "Add HidlSupport.java for utility methods for HIDL." 2017-03-29 00:32:19 +00:00
Tianjie Xu
42cfd56d47 Report the temperature during an OTA update
Bug: 32518487
Test: mma
Change-Id: I00494aff91b473ae54eff8d56910198f88083d40
2017-03-28 16:59:16 -07:00
Calin Juravle
a9f46f76af Register secondary dex files for JIT profiling
Test: boot, and check that profiles get recorded for secondary dex files

Bug: 32871170
Bug: 26719109

(cherry picked from commit f5a7bfc8d5)

Merged-In: I2de23ef44eee3f1783ae698821f1c6d88c66c9a6
Change-Id: Id9bbd630b8485dc17eeef846295458df5cfe446a
2017-03-28 16:00:21 -07:00
Yifan Hong
8ef5feadb8 Add HidlSupport.java for utility methods for HIDL.
The old .equals code uses Objects.deepEquals,
which does not handle for, e.g. ArrayList<byte[]>.
Create our own recursive HidlSupport.deepEquals
and deepHashCode method to handle these edge cases.

Bug: 36454147
Test: hidl_test_java
Change-Id: I56dc48985486b561263c260cf43aa90f30d581d0
2017-03-28 22:47:32 +00:00
Tianjie Xu
1cd3a93288 Merge "improve the format of locale argument when calling recovery"
am: 032c7a0a18

Change-Id: I54389601ac5234b872701762e928a3ea7ff2f307
2017-03-28 19:53:45 +00:00
Tianjie Xu
032c7a0a18 Merge "improve the format of locale argument when calling recovery" 2017-03-28 19:42:54 +00:00
Robin Lee
f3b8a45f86 Remove unused network management RPCs
These were previously used for legacy VPN network lockdown, but they
aren't any more, so we don't need them any more.

Test: make -j30 full # still builds
Bug: 33159037
Change-Id: I03ab248a52dd7aed29fc049622aeb4dbca1e86ae
2017-03-27 13:40:52 +01:00
Adam Lesinski
e4d926d9af Merge "Update IBatteryPropertiesRegistrar.aidl to support force updates"
am: 0aae170841

Change-Id: I8363aab4dbf0690b92988353d9360c713412a0be
2017-03-23 00:48:31 +00:00
Tianjie Xu
38715228da improve the format of locale argument when calling recovery
Switch the locale argument from Locale.toString() to
Locale.toLanguageTag(). The new format is more readable and less error
prone.

Bug: 35215015
Test: recovery processes sr-Latn correctly

Change-Id: I47e1cf54434cb841652d4b259e0e829104fb19a2
2017-03-22 12:34:22 -07:00
Adam Lesinski
2392cbd888 Update IBatteryPropertiesRegistrar.aidl to support force updates
Change-Id: Ic4f705a20db32369d106462c47eb150850a3f638
Test: builds
2017-03-22 19:32:43 +00:00
Martijn Coenen
cea6624ffa Merge "Add HwParcel::releaseParcel()"
am: 210b9afe64

Change-Id: If08cb12187e9694144d5c07d9f6fcd67142b8af9
2017-03-16 19:42:45 +00:00
Martijn Coenen
210b9afe64 Merge "Add HwParcel::releaseParcel()" 2017-03-16 19:35:58 +00:00
Martijn Coenen
3d726d16b6 Add HwParcel::releaseParcel()
To be able to free native Parcel objects as soon
as a transaction is done.

Test: hidl_test_java
Bug: 36088202
Change-Id: I50b3eb7e9fe06958c64575923730d3467e73b9a5
2017-03-16 17:58:22 +00:00
Elliott Hughes
40c4210f8f Merge "Restore SystemProperties.PROP_NAME_MAX to keep Kindle running."
am: ef9c425416

Change-Id: I0ea94267a6d6cfa137e77edde288632d04a71bcd
2017-03-16 05:40:47 +00:00
Elliott Hughes
70cfefa01a Restore SystemProperties.PROP_NAME_MAX to keep Kindle running.
The limit has been lifted in O, but without this constant, Kindle crashes here:

  Caused by: java.lang.NoSuchFieldException: PROP_NAME_MAX
    at java.lang.Class.getField(Class.java:1607)
    at com.amazon.android.webkit.AmazonWebKitFactories$Implementation.<clinit>(AmazonWebKitFactories.java:59)

The code seems to want to truncate a system property name to avoid the
exception that SystemProperty.get threw if passed a name that was too long.

Bug: http://b/36095274
Test: select a word in Kindle
Change-Id: Id1881a8a7c6386400a1024beb0d1b741bdaefba7
2017-03-15 13:01:53 -07:00
Martijn Coenen
7665332a7a Merge "Remove interfaceChain from IServiceManager::add()"
am: 4a75e32f1d

Change-Id: I9443e22ed730c44abc6fd6f697f8b3f04b667f37
2017-03-09 08:39:15 +00:00
Martijn Coenen
4a75e32f1d Merge "Remove interfaceChain from IServiceManager::add()" 2017-03-09 08:33:04 +00:00
Calin Juravle
b1818b8a36 Merge "PackageManager: Clean up code related to foreign dex use"
am: eef66fd0c7

Change-Id: I443f001c15daddd63a17685c2e82fc9a619c45ee
2017-03-07 21:23:03 +00:00
Calin Juravle
4c06f55f14 PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170

(cherry picked from commit 74f0a3450c)

Change-Id: I2a9daca15e5120518852584fa17aa94012af8f1a
Merged-In: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-07 11:39:24 -08:00
Martijn Coenen
85d12da977 Remove interfaceChain from IServiceManager::add()
Bug: 32742469
Test: hidl_test, hidl_test_java, binderized marlin boots
Change-Id: I418a5123e62517961a685a6433fe4ba384264862
2017-03-06 15:43:42 +01:00
Tobias Thierer
50351bd85c Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore"
am: 3e6c189c68

Change-Id: I981b746a28cda09d7a75fa79faeacb2cc58b1fc4
2017-03-03 12:07:59 +00:00
Tobias Thierer
3e6c189c68 Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" 2017-03-03 12:02:09 +00:00
Elliott Hughes
6f00e6e977 Merge "Remove the name length limit for system properties."
am: c657b769ab

Change-Id: I700b379c0482d7d9609183a39a5c9664746ea5aa
2017-03-03 00:30:10 +00:00
Elliott Hughes
c657b769ab Merge "Remove the name length limit for system properties." 2017-03-03 00:22:31 +00:00
Elliott Hughes
33cc60ccc9 Remove the name length limit for system properties.
Bug: http://b/33926793
Test: builds
Change-Id: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
Merged-In: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
2017-03-02 14:17:03 -08:00
Shubham Ajmera
c847aae2cf Merge "Fix Javadoc for StrictMode#permitUnbufferdIo"
am: b8648ae07a

Change-Id: I86adc3e40c083c999b717384ae38e437a17a9557
2017-03-02 17:32:14 +00:00
Treehugger Robot
b8648ae07a Merge "Fix Javadoc for StrictMode#permitUnbufferdIo" 2017-03-02 17:23:45 +00:00
Elliott Hughes
91c1048bc7 Merge "Basic javadoc for android.os.UpdateEngine."
am: cbafc8d682

Change-Id: I927f7e3014d7e27b4e003d2f4f4fdaa7ea0645c5
2017-03-02 03:01:34 +00:00
Shubham Ajmera
ade21170a7 Fix Javadoc for StrictMode#permitUnbufferdIo
Bug: 35813076
Test: no tests
Change-Id: I2f71cad7a7a3f85908b322e2b83ba265c49adbad
2017-03-01 09:26:41 -08:00
Tobias Thierer
8bacd9bd02 Move value for the Build.CUR_DEVELOPMENT constant into libcore
This matches a corresponding libcore change. It is to allow
libcore to use this value as a default when no other value is
explicitly set, e.g. in the system server or during testing
with vogar.

Bug: 34072201
Test: Device boots with CLs from this CL's topic.
Change-Id: Id812339a343ecea84a08bfdf4b873f3b156a13d4
2017-03-01 12:44:01 +00:00
Elliott Hughes
e3ce3e8bab Basic javadoc for android.os.UpdateEngine.
Bug: N/A
Test: N/A
Change-Id: Icb870e7720e8b50082d353e7ea08007e1f4e2fdc
2017-02-28 15:19:32 -08:00
Leonard Mosescu
de021d8162 Merge "Adding "attach-agent" to ActivityManagerShellCommand" am: 05dfd10254 am: db0803b4e8
am: 7bf598cbd9

Change-Id: If7b73860cc8249b997d5e9a7a4d149732b08449b
2017-02-16 23:37:48 +00:00
Leonard Mosescu
02758a9a80 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2017-02-16 13:19:41 -08:00
songjinshi
78a3d9dab4 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85 am: ec69bd0aa3
am: 36bcc913f7

Change-Id: Icf40ff98196d885e6974eb679532064b30bc68cd
2017-02-08 20:28:48 +00:00
songjinshi
e02e3ea7f9 [Debug]: Add timeout for dumpNativeBacktraceToFile.
If the debuggerd be blocked, the watchdog and
activitymanager thread will be blocked when the
ANR or watchdog occurs,so we needed to add
timeout for dumpNativeBacktraceToFile.

Change-Id: Iab1a64328e70257025d860638d93a4fb8eaaeea2
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2017-02-07 19:17:45 +00:00