1954 Commits

Author SHA1 Message Date
TreeHugger Robot
5c34fa8ae7 Merge "Initialize bootanimation sound on separate thread" 2017-02-01 15:46:01 +00:00
Geoffrey Pitsch
a917353da0 Initialize bootanimation sound on separate thread
Blocks when it's time to play the first sound.
Bug: 30189706
Test: on marlin
Change-Id: Ib3666fbfb5f109c633ed59edad4a283b8ada8ae2
2017-01-31 15:49:06 -08:00
Robert Carr
db7ecbe699 Correct Screencap utility code.
Screenshot interface now takes signed parameters.

Bug: 34758075
Test: None
Change-Id: I884456ce7f22a9e57990371ad66f6bb55d09e999
2017-01-31 11:02:58 -08:00
Shukang Zhou
bb44e42de9 [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-30 13:07:40 -08:00
Shukang Zhou
221e58fe95 Merge "[Frameworks] Add an 'am' cmd option to enable streaming in profiling." am: e924640c4b
am: b0f03a64ea

Change-Id: I35fa80e43cd4f6af76099848714f838f217b7989
2017-01-27 19:01:44 +00:00
Treehugger Robot
e924640c4b Merge "[Frameworks] Add an 'am' cmd option to enable streaming in profiling." 2017-01-27 18:49:45 +00:00
Elliot Waite
0ce4b0e4c3 Fix @links in reference docs. am: 54de77470d am: ab978c035e am: 28ba4722a9
am: 9b21265b2c

Change-Id: If246ebdb36cf2832d5a6c42cbe752e290b6fb6e8
2017-01-26 04:49:33 +00:00
Elliot Waite
9b21265b2c Fix @links in reference docs. am: 54de77470d am: ab978c035e
am: 28ba4722a9

Change-Id: I98177a8cf0a20677e140406bb7371474ca259e5b
2017-01-26 04:44:54 +00:00
Elliot Waite
28ba4722a9 Fix @links in reference docs. am: 54de77470d
am: ab978c035e

Change-Id: If0d0613362e0ea95cf48eaf9a16d3eea48b589ea
2017-01-26 04:39:57 +00:00
Elliot Waite
ab978c035e Fix @links in reference docs.
am: 54de77470d

Change-Id: Id38c30bad13d6b61ed504a06471b9f197b360f7b
2017-01-26 04:34:57 +00:00
Elliot Waite
54de77470d Fix @links in reference docs.
Change-Id: I40cea46efd80c448640ff69753698fe8404da40b
2017-01-25 17:00:55 -08:00
Shukang Zhou
6ec0b7e21d [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-25 16:53:41 -08:00
Adam Lesinski
4e8628157a Add support for Split APK dependcies
Apps can now declare in their base APK AndroidManifest.xml
that they want to have their split APKs loaded in isolated
Contexts. This means code and resources from the split
get loaded into their own ClassLoader and AssetManager.

<manifest xmlns:android="..."
          ...
          android:isolatedSplits="true"
          ...

In order to make this more useful, splits can declare dependencies
on other splits, which will all get pulled in to the Context
and run as expected at runtime.

A split declares its dependency on another split by using the
tag <uses-split> in its AndroidManifest.xml:

<manifest xmlns:android="...">
    ...
    <uses-split android:name="feature_split_1" />
    ...

A split can have a single parent on which it depends on. This is
due to the limitation of having a single ClassLoader parent.
All splits depend on the base APK implicitly.

PackageManager verifies that no cycles exist and that each dependency
is present before allowing an installation to succeed.

The runtime will then load splits based on the dependencies.

Given the following APKs:

base <-- split A <-- split C
  ^----- split B

If an Activity defined in split C is launched, then the base,
split A, and split C will be loaded into the ClassLoader defined
for the Activity's Context. The AssetManager will similarly be loaded
with the resources of the splits.

A split can be manually loaded by creating a Context for that split, defined
by its name:

Context.createContextForSplit("my_feature_split_1");

All installed Activities, Services, Receivers, and Providers are accessible
to other apps via Intent resolution. When they are instantiated, they are
given the appropriate Context that satisfies any dependencies the split they
were defined in stipulated.

Test: WIP (CTS tests to come)
Change-Id: I8989712b241b7bc84381f2919d88455fcad62161
2017-01-24 18:34:08 -08:00
Frank Barchard
39a1fce439 media volume allow --get to be combined with --set and --adj
Bug: 33819516
Test: adb shell media volume --stream 3 --adj lower --get
Change-Id: Ie30f5c0ea54bfac59c2e05513da61a98658f7d0e
2017-01-24 23:47:19 +00:00
Shreyas Basarge
865303fce5 API to select backup transport
This cl adds an API to select a backup
transport by its component name and
receive a callback when BackupManager
is bound to the transport. Calling this API
will make BackupManager bind to the transport
if it isn't already bound to it.

Also fixes the issue where BackupManager would
detect only one transport per package.

Ref: go/backup-transport-switching

Bug: 33616220
Test: Manually tested. GTS tests will be put up shortly.

Change-Id: I8c23bdbb84ceb05eb1fad9b3a8b9c4441cb06c74
2017-01-24 17:28:48 +00:00
Paul Duffin
762b31f7a4 Merge "Prepare for removal of legacy-test from default targets (Part 2)" am: 5a3a3d298a am: a07f9d522b
am: 5aa7e5b46f

Change-Id: I6aede1f1e2216233493cebe3efba43686aa3ad0d
2017-01-24 16:18:43 +00:00
Paul Duffin
5aa7e5b46f Merge "Prepare for removal of legacy-test from default targets (Part 2)" am: 5a3a3d298a
am: a07f9d522b

Change-Id: I758123e58a78ac515fb4ed0ce8e1647cfd1a3dc8
2017-01-24 16:12:57 +00:00
Paul Duffin
4190f233f9 Prepare for removal of legacy-test from default targets (Part 2)
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Merged-In: If507b641624a2933e722f61e815890fcdf442265
Change-Id: Icdcad50f1cc32e900bc9e882f1db2867ea170fbf
2017-01-24 15:26:42 +00:00
Svet Ganov
6788212d17 Platform support for static shared libraries
This change adds support for static shared libraries that
emulate static linking allowing apps that statically link
against the same library version to share a common
implementation. A library is hosed by a package in a standard
APK.

Static shared libraries have a name and a version declared
by a dedicated manifest tag. A client uses also a new tag
to refer to the static library it uses by specifying the
lib name, version, and the hash of the signing certificate.
This allows two apps to rely on two different library versions
and prevents impersonation of the shared library by a side-loaded
app with the same package name.

Internally apps providing static libs use synthetic package
name generated from the manifest package name and the library
version. This allows having different "versions" of the same
package installed at the same time.

An application cannot be installed if a static shared lib it
depends on is missing. A used shared library cannot be uninstalled.
Shared libraries can rotate certificates like normal apps. The
versions of these libs should be ordered similarly to the version
codes of the hosting package. Such libs cannot use shared user
id, cannot be ephemeral, cannot declare other libraries, cannot
rename their package, cannot declare child-packages. They must
target O SDK. Also they cannot be suspended or hidden or their
uninstall blocked. Generally, speaking policy regarding code in
static shared libs should be applied to the packages using the
library as it could have just statically linked the code.

We now have APIs to query information about the shared libraries
on the device in general. To clients static shared libraries are
presented as multiple versions of the same package which is how
they are declared and published. Therefore, one can have two
versions of the same package which means we need way to query
for and uninstall a specific version of a package. Also static
shared libs can depend on other static shared libs which are
versioned packages. To ease representation we add the concept
of a versioned package which should be used in the case of
static shared libs.

A client can see only the static shared libs it depends on and
more specifically only the versions it depends would be retrieved
by using the standard package manager APIs. There is a new
dedicated API to get info about all shared libraries which
would provide data about all static shared lib versions. Also
these libraries must use v2 signing scheme.

Test: CTS tests pass

bug:30974070

Change-Id: I4f3d537ee7a81f880950377b996e1d9d4813da5c
2017-01-22 14:05:15 -08:00
Paul Duffin
1d0244a846 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: If507b641624a2933e722f61e815890fcdf442265
2017-01-20 09:00:33 +00:00
Shreyas Basarge
38e7486d38 Non incremental backup flag for requestBackup
This cl adds a new requestBackup API to
BackupManager that takes in an int flag
to indicate whether the caller wants the
entire key value set to be passed to the
transport and not just a diff.

Change-Id: Ia225797a58c4431fe742f2f116b257d006b30cd1

Bug: 33749084
Ref: go/request-backup-api-changes
Test: GTS Test at ag/1774002
2017-01-19 22:13:01 +00:00
Paul Duffin
43267b4b9e Merge "Prepare for removal of legacy-test from default targets" am: c74ccf1588 am: ab62fd67d8
am: 56a2ae1056

Change-Id: I0ede6895eb25f72a74af3ac4431a21960500bec5
2017-01-19 11:49:28 +00:00
Paul Duffin
56a2ae1056 Merge "Prepare for removal of legacy-test from default targets" am: c74ccf1588
am: ab62fd67d8

Change-Id: I923de1762a15fca7dc255f9dfe0ecce6f54d333c
2017-01-19 11:44:56 +00:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Paul Duffin
648abd31e8 Merge "Prepare for removal of legacy-test from default targets" 2017-01-19 09:34:19 +00:00
Josh Gao
ed5444ba4f app_process: don't use PR_SET_NO_NEW_PRIVS. am: 92517e4c03 am: b6025a2be1 am: f442f1bd66
am: 19c0d60d14

Change-Id: I839f9762c6705c3422c0e286600241943f88f348
2017-01-19 00:43:47 +00:00
Josh Gao
19c0d60d14 app_process: don't use PR_SET_NO_NEW_PRIVS. am: 92517e4c03 am: b6025a2be1
am: f442f1bd66

Change-Id: I80edffa8c2930b84aaccc211340506049825837a
2017-01-18 23:57:21 +00:00
Josh Gao
f442f1bd66 app_process: don't use PR_SET_NO_NEW_PRIVS. am: 92517e4c03
am: b6025a2be1

Change-Id: I4fe51640d77e16866b5897cdc70424e9bd640066
2017-01-18 23:44:31 +00:00
Tucker Sylvestro
f07d408798 svc nfc should support watches too am: 1876583bfb am: eed0a7bf45
am: 93591413eb

Change-Id: I5324063d869d8387b4964279b461cdd232011887
2017-01-18 16:47:59 +00:00
Tucker Sylvestro
93591413eb svc nfc should support watches too am: 1876583bfb
am: eed0a7bf45

Change-Id: If7f2515750bb74d0c9f3baae9fe0a1fc3eeb36ef
2017-01-18 16:41:54 +00:00
Paul Duffin
8aeb59ebcd Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
2017-01-18 16:39:34 +00:00
Tucker Sylvestro
baa26e2d3d svc nfc should support watches too
am: 1876583bfb

Change-Id: I9612fbe232ecf883fda2c629438ed55ddb50c468
2017-01-18 16:34:58 +00:00
Tucker Sylvestro
eed0a7bf45 svc nfc should support watches too
am: 1876583bfb

Change-Id: Ic3f0277c2c13dbd2c4f8b6ec5dbe9f9dc34ef297
2017-01-18 16:34:50 +00:00
Tucker Sylvestro
1876583bfb svc nfc should support watches too
Check for both FEATURE_NFC and FEATURE_NFC_HOST_CARD_EMULATION in the
"svc nfc" command.  Watches may only have the latter, but should still
support the nfc enable/disable command.

See b/24532713#comment7 for context.

Bug 32386425

Change-Id: I307798f00728c6b437aebfcf58115af7265e3692
2017-01-18 10:27:38 -05:00
Josh Gao
92517e4c03 app_process: don't use PR_SET_NO_NEW_PRIVS.
selinux should provide equivalent protection, and this prevents
transitioning to a helper binary for crash dumping.

Bug: http://b/30705528
Change-Id: I64b05236931d418f268b193418e937ab6b0985e0
2017-01-17 13:55:20 -08:00
Felipe Leme
c88368c270 Added BUGREPORT_OPTION_TELEPHONY.
am: a561b1f9c0

Change-Id: I063a0d6c4c66035082789d4361b649439da00bf9
2017-01-11 23:09:01 +00:00
Felipe Leme
a561b1f9c0 Added BUGREPORT_OPTION_TELEPHONY.
This option takes a lightweight version of bugreport that only includes a few,
urgent sections used to report telephony bugs.

BUG: 32589463
BUG: 26849505
Test: manual
Merged-In: I6f90c02779a1e8aead690428626e3b9f06aa04df
Change-Id: I6f90c02779a1e8aead690428626e3b9f06aa04df
2017-01-10 15:43:27 -08:00
Frank Barchard
b6b3030539 media volume: remove old --set and rename --index to --set
The old --set did not take a parameter for volume and was
defaulting to volume index of 5.
The old --index option allowed the user to set the volume to
a specified value.
This CL removes the old --set that had limited usefulness, and
renames --index to --set, so --set now takes a parameter for
volume.
For backward compatibility the --index option is kept around
to allow scripts time to switch to --set

Bug: 33791633
Test: adb shell media volume --set 4
Change-Id: I43a87a878439b3416efa746708b62a869023acdc
2016-12-22 00:18:50 +00:00
Frank Barchard
f41d429ce7 media volume --get outputs the current volume
Add --get option to media volume to fetch the specified
stream volume and output it on the console.
Also displays the min and max volume for that stream.

Bug: 33559057
Test: adb shell media volume --stream 3 --get
Change-Id: Icc82ba1349dd75e07ccff4872e104843a69e5f17
2016-12-21 18:30:28 +00:00
Joe Onorato
1754d744a7 First checkin of incident reporting.
There are a few major pieces here:

incidentd
---------
This daemon (started by init) runs and accepts incoming requests to take
incident reports.  When prompted, it calls into various system services
and fills in an IncidentProto data structure, and then writes the report
into dropbox.

The next steps for incidentd:
    - Security review of SELinux policies. These will be a subset of
      the dumpstate permissions.  Until this is done, incidentd is
      not started at boot time.

incident
--------
This shell command calls into incidentd, and can initiate an incident
report and either capture the output or leave for dropbox.

incident_report
---------------
This host side tool can call adb shell with the correct parameters
and also format the incident report as text.  This formatting code
was left of the device on purpose.  Right now it's pretty small, but
as the number of fields increases, the metadata and code to do the
formatting will start to grow.

The incident_report command also contains a workaround to let it
work before incidentd is turned on by default.  Right now, it is
implemented to call adb shell dumpsys <service> --proto directly,
whereas in the future it will go through the full incidentd flow.

incident_section_gen
--------------------
A build-time tool that generates a stripped down set of information
about the fields that are available.

libincident
-----------
This library contains the code to connect to incidentd, and the
meta proto definitions that are used by the framework protos.
The basics are here now, but they are not fully fleshed out yet.
The privacy.proto file contains annotations that can go in the
proto file that we will later use to filter which fields are
uploaded, and which are used by local sources.  For example, a
device in a test lab is safe to upload much much more information
than a real user.  These will share the same mechanism, but the
user's output will be filtered according to these annotations.

frameworks/core/proto
---------------------
These .proto files contain the definitions of the system's
output.  There is one master android.os.IncidentProto file that
is the top level of an incident report, but some other services
(notification, fingerprint, batterystats, etc) will have others
that are used directly by the logging mechanism.

Other files which are shared by several of the services also go
here, such as ComponentName, Locale, Configuration, etc.  There
will be many more.

There is also a first iplementation of a dump method handling
--proto in the fingerprint service.

IncidentManager
---------------
The java API to trigger an incident report.

Test: Not written yet
Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f
2016-12-15 11:23:05 -08:00
Svetoslav Ganov
e07563cc96 Add WiFi toggle prompts - framework
am: 82737b42a6

Change-Id: Ia8958b54d04fff971b96fc6d29771eb94fd9b17e
2016-12-13 16:02:23 +00:00
Ivan Podogov
e5592abb83 Merge changes from topic 'f-radio-toggle' into cw-f-dev
* changes:
  Add WiFi toggle prompts - framework
  Add Bluetooth toggle prompts - framework
2016-12-13 15:55:30 +00:00
Dmitri Plotnikov
190495a690 Merge "Adding "quiescent" reboot mechanism to support STB operators" 2016-12-12 21:37:33 +00:00
Jean-Michel Trivi
be47e19355 Extend "media" shell command for volume control
Add option to the "media" command to set or adjust the volume.
Run "adb shell media" for options and examples.

Test: adb shell media

Change-Id: I434f9cd33a9fefb2cd21a3415ec8b2e0a569482e
2016-12-10 11:44:26 -08:00
TreeHugger Robot
61bde4d40c Merge "Replace ContentProvider SQL args w/ Bundle & Constants." 2016-12-09 22:25:29 +00:00
Steve McKay
ea93fe7539 Replace ContentProvider SQL args w/ Bundle & Constants.
Test: cts-tradefed run cts-dev -m CtsContentTestCases
Bug: 30927484
Change-Id: Idb9dbc2b80896e9f8474a0db71353b7a3810d597
2016-12-09 12:31:44 -08:00
Todd Kennedy
b771768249 Add system API to install ephemeral apps
Test: manual; install using "adb install --ephemeral"
Change-Id: Idce214779fea5f3c4a0121542319044f9f0e0a42
2016-12-08 14:51:43 -08:00
Dmitri Plotnikov
a8d2c6457f Adding "quiescent" reboot mechanism to support STB operators
Bug: 31681185
Change-Id: Iada4dd4624f0221e5b59440da2718da980742720
Test: with SampleLeanbackDeviceAdmin.  CTS test forthcoming
2016-12-08 10:49:24 -08:00
Hal Canary
10219fb261 SkImageEncoder->SkEncodeImage
Test: none
Change-Id: I15630d2852d12840329181f135852e28d287bbcf
(cherry picked from commit 8c6bac4c77caeefb667bec90d16b5384fd2b2b31)
2016-12-07 13:29:42 +00:00
Paul Duffin
4a7cda98fc Merge "Replace core-junit with junit" am: 6ac5293751 am: a4d7100a3b am: 9cb5f2815d
am: b6961ffa53

Change-Id: Id397baf01c8285b0843a66afd544ddf89abf451f
2016-12-07 13:24:14 +00:00