summaryrefslogtreecommitdiffstats
path: root/core/tests
Commit message (Collapse)AuthorAgeFilesLines
* Package and storage movement callbacks.Jeff Sharkey2015-04-231-80/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since package and primary storage movement can take quite awhile, we want to have SystemUI surface progress and allow the Settings app to be torn down while the movement proceeds in the background. Movement requests now return a unique ID that identifies an ongoing operation, and interested parties can observe ongoing progress and final status. Internally, progress and status are overloaded so the values 0-100 are progress, and any values outside that range are terminal status. Add explicit constants for special-cased volume UUIDs, and change the APIs to accept VolumeInfo to reduce confusion. Internally the UUID value "null" means internal storage, and "primary_physical" means the current primary physical volume. These values are used for both package and primary storage movement destinations. Persist the current primary storage location in MountService metadata, since it can be moved over time. Surface disk scanned events with separate volume count so we can determine when it's partitioned successfully. Also send broadcast to support TvSettings launching into adoption flow. Bug: 19993667 Change-Id: Ic8a4034033c3cb3262023dba4a642efc6795af10
* Move extension checking code into FileUtils.Ben Kwa2015-04-231-0/+64
| | | | | | | | | | Move code for checking file extensions and MIME types from ExternalStorageProvider into android.os.FileUtils, so it can be used by other clients (e.g. DownloadsProvider). BUG=20157955 Change-Id: Ib16a16af723c21fb8d2912c8917dfd68653ea6fa
* Always send volume UUID with installd commands.Jeff Sharkey2015-04-181-2/+2
| | | | | | | | Since packages can be moved to other volumes, all relevant commands to installd now require an explicit volume UUID parameter. Bug: 20275577 Change-Id: Ie84f5bc43c7aada5800b8d71692c7928b42b965e
* am 34f0fd23: am a04b4302: am b0557ace: Merge "Remove ↵Dmitriy Ivanov2015-04-171-1/+0
|\ | | | | | | | | | | | | LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS" * commit '34f0fd239c456e4e064e4c14b768962292023800': Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS
| * Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONSDmitriy Ivanov2015-04-171-1/+0
| | | | | | | | | | | | It is no longer needed. Change-Id: I1b5a58528507df35cc0792a18be5583e3605cbe0
* | am 73e056d3: am 402f2501: am 3312c6b9: Merge "Add ↵Erik Kline2015-04-142-0/+33
|\ \ | |/ | | | | | | | | | | android.net.IpPrefix#contains()" * commit '73e056d3931b419c2653eb7365fb72b50a9a36c3': Add android.net.IpPrefix#contains()
| * Add android.net.IpPrefix#contains()Erik Kline2015-04-142-0/+33
| | | | | | | | | | | | | | | | | | This was originally to avoid RuntimeException in RouteInfo#matches(): When an IPv6 prefix with a length greater than the max permitted for IPv4 is matched against an Inet4Address, the call to NetworkUtils throws RuntimeException. Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d
| * Load libraries directly from apkDmitriy Ivanov2015-04-077-3/+133
| | | | | | | | | | | | | | | | | | | | Introduced new 'extractNativeLibs' attribute to manifest/application. Setting it to false prevents installer from extracting library from apk. The default value for extractNativeLibs is true. Bug: 8076853 (cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27) Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
* | Support moving apps to expanded storage.Jeff Sharkey2015-04-101-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start deriving the data path for apps based on the volume UUID where the app lives. This path is used for all higher-level APIs, giving us a clean place to switch app storage. When parsing a package, keep track of the volume UUID where it lives and update PackageSetting once installed. For now continue treating moves as installs, but we'll eventually clean this up to avoid the additional dexopt pass. Wire up move to use the new installd command to move private data between devices. Cache LoadedApk only for the current user, since otherwise the data dir points at the wrong path. Bug: 19993667 Change-Id: I53336e3b147d5fd3130e6800869af172b628da37
* | resolved conflicts for merge of 261e7a37 to masterAlex Klyubin2015-04-011-0/+52
|\ \ | |/ | | | | Change-Id: If0a3389764965fe27bf567090a6e24069b61c544
| * Cleanse HTTP, HTTPS, and FTP URLs in Uri.toSafeString.Alex Klyubin2015-04-011-0/+52
| | | | | | | | | | | | | | | | | | This makes the hidden API android.net.Uri.toSafeString omit most parts of HTTP, HTTPS, and FTP URLs to avoid leaking anything unsafe. Only the host and port are retained for these URLs. Bug: 19215516 Change-Id: I2e9e33d9afaa9de5dd07a40532d56f0a2179f62a
* | Support for nested bundles in setApplicationRestrictionsFyodor Kupolov2015-03-304-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new restriction types - bundle and bundle-array. Modified RestrictionsManager.getManifestRestrictions to support new hierarchical restrictions. Added RestrictionsManager.convertRestrictionsToBundle, which enables programmatic conversion from a list of RestrictionEntries to a Bundle. Modified read/write methods for application restrictions in UserManagerService. Added unit tests. Bug: 19540606 Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970
* | Keep debug information in NetworkStats filesWenchao Tong2015-03-271-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create two special SETs. SET_DBG_VPN_IN is used by individual applications to know how much traffic of the NetworkIdentity was actually moved from a VPN app. SET_DBG_VPN_OUT is used by the VPN app to know how much traffic of the NetworkIdentity was deducted. A debug application can restore the raw stats by these entries. raw_traffic = recorded_entry (TAG_NONE, SET_ALL) + recorded_entry (TAG_NONE, SET_DBF_VPN_OUT) - recorded_entry (TAG_NONE, SET_DBF_VPN_IN) The two debug SETs are not returned by NetworkStatsService.openSession(). These debug entries are retrieved by NetworkStatsCollection.dump(). Bug: 19536273 Change-Id: I03ef9f7667f5f2f48cbe3f6b11447fe7ead8ad3b
* | Merge "Create a Benchmark test for NetworkStats."Wenchao Tong2015-03-271-0/+82
|\ \
| * | Create a Benchmark test for NetworkStats.Wenchao Tong2015-03-231-0/+82
| | | | | | | | | | | | | | | Bug: 19536273 Change-Id: I438ed3affa799612566b04e324e43bc5ea74079f
* | | Load libraries directly from apkDmitriy Ivanov2015-03-217-3/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced new 'extractNativeLibs' attribute to manifest/application. Setting it to false prevents installer from extracting library from apk. The default value for extractNativeLibs is true. Bug: 8076853 Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
* | | Add two utility methods for IPv4 netmasks.Lorenzo Colitti2015-03-201-0/+70
|/ / | | | | | | | | | | | | | | | | 1. Add a validating method to convert a netmask to a prefix length. 2. Add a function to get the implicit netmask of an IPv4 address. 3. Add a unit test. Bug: 19704592 Change-Id: Icb9f58d3903ea01df9e3720383c9bd5db6dd8f26
* | Merge "NetworkStats to support VPN accounting."Wenchao Tong2015-03-121-0/+67
|\ \
| * | NetworkStats to support VPN accounting.Wenchao Tong2015-03-091-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | Create a new method to migrate underlying network traffic from VPN app to other apps. Bug: 19536273 Change-Id: I3434cad361592e26b01225edf8012f7b16afc98f
* | | Fix handling of LOCAL_JACK_ENABLEDYohann Roussel2015-02-236-25/+51
|/ / | | | | | | Change-Id: I5180aa6b685859b7855d0037f38178e906e21bd3
* | Normalize deprecated 2-letter language code when necessary.Yohei Yukawa2015-02-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | This is a follow up CL for I7d932e60311b80c05be8f02c9e803f18da0e0054, which revealed that we could not use deprecated 2-letter code like "in" to query subtype which has new language codes like "id". This CL addresses the above issue by normalizing the language code with Locale#Locale(String, String) before comparing one to another. Change-Id: I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10
* | Add tests for Ibb9eb9f65323795d139 and I6571d464a46453934f0Yohei Yukawa2015-02-201-32/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds several unit tests for following CLs, both of which enabled InputMethodUtils (and dependent IMF logic) to handle 3 letter language codes and conversion from deprecated two-letter codes to new ones correctly. - Ibb9eb9f65323795d139b16d76b7e7e36a4e0568c - I6571d464a46453934f0a8f5e79018a67a9a3c845 As described in tests, the input method framework has already been able to recognize 3 letter language codes. However, there remain inconsistencies when we use deprecated 2-letter code to query subtype like "in" but the subtype has new language codes like "id". Subsequent CLs are supposed to address remaining issues. bug: 10090157 Change-Id: I7d932e60311b80c05be8f02c9e803f18da0e0054
* | Merge "RegisteredServicesCache now saves files to a user-specific dir"Fyodor Kupolov2015-02-131-54/+148
|\ \
| * | RegisteredServicesCache now saves files to a user-specific dirFyodor Kupolov2015-02-121-54/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, its state was saved in a single xml file inside /data/system/registered_services. Services are now stored in separate files stored in a user-specific dir. A one-off migration step was added, which runs, when the system discovers a file in the old format. Bug:19321135 Change-Id: Ie92be01047f4855d01352b6a304820b37344ae2c
* | | Merge "Move apache specific portions of android.net.http to ↵Narayan Kamath2015-02-134-3/+5
|\ \ \ | |/ / |/| | | | | external/apache-http."
| * | Move apache specific portions of android.net.http to external/apache-http.Narayan Kamath2015-02-124-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We continue to compile external/apache-http into ext.jar. This contains a few changes apart fom the classes moving around : - Makefile changes to build docs and api-stubs for now. A future change will revert these changes and remove these classes from stubs and docs. - Hardcode event IDs in legacyerrorstrings to avoid a dependency between the frameworks and apache. These strings are on their way out and will never change anyway. - Remove imports due to {@link} tags and use {@code} instead. - Remove an accidental(?) dependency on apache commons code that's a part of apache-http. bug: 18027885 Change-Id: I51cd038d846ec7d02c283a4541b10a6a9cf62ecf
* | | am 33d3c53d: resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aospAlex Klyubin2015-02-111-5/+6
|\ \ \ | |/ / |/| / | |/ | | * commit '33d3c53da021f0d044028860ace0f4ad817273f5': Move hidden ApplicationInfo flags into a separate field.
| * resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aospAlex Klyubin2015-02-111-5/+6
| |\ | | | | | | | | | Change-Id: Ic20b6c8851458483dd73a144bd5ae6e8d141e62a
| | * Move hidden ApplicationInfo flags into a separate field.Alex Klyubin2015-02-111-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The public API field android.content.pm.ApplicationInfo.flags can support only 32 flags. This limit has been reached. As a short term workaround to enable new public flags to be added, this CL moves flags which are not public API into a separate new field privateFlags and renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED is now PRIVATE_FLAG_PRIVILEGED). The new privateFlags field is not public API and should not be used for flags that are public API. The flags that are moved out of ApplicationInfo.flags are: * FLAG_HIDDEN, * FLAG_CANT_SAVE_STATE, * FLAG_FORWARD_LOCK, and * FLAG_PRIVILEGED. NOTE: This changes the format of packages.xml. Prior to this CL flags were stored in the "flags" attribute. With this CL, the public flags are stored in a new "publicFlags" attribute and private flags are stored in a new "privateFlags" attribute. The old "flags" attribute is interpreted by using the old values of hidden/private flags. Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
* | | Added unit test for RegisteredServicesCacheFyodor Kupolov2015-02-101-0/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | Minor refactoring of RegisteredServicesCache for testability. Added RegisteredServicesCacheTest which uses a mock version of RegisteredServicesCache. Bug:19321135 Change-Id: If18b794b28f03b4bf4bbdfbba9e9a57e808aaebf
* | | Merge "Adapt to change of LOCAL_USE_JACK values"Yohann Roussel2015-02-056-8/+24
|\ \ \
| * | | Adapt to change of LOCAL_USE_JACK valuesYohann Roussel2015-02-056-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove depency to the dx main dex list when building with Jack. Change-Id: I13e45dc8406a6a71309d151bf1542b1296c17792
* | | | am b43e74bb: am 12b26c12: am 21702263: Merge "Add a unit test for ↵Lorenzo Colitti2015-02-051-0/+225
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | StaticIpConfiguration." * commit 'b43e74bbce46f2f328e2031a7ae3447f415ef9ca': Add a unit test for StaticIpConfiguration.
| * | am 12b26c12: am 21702263: Merge "Add a unit test for StaticIpConfiguration."Lorenzo Colitti2015-02-051-0/+225
| |\ \ | | |/ | | | | | | | | | * commit '12b26c12483633f7a75d1f1c9ead73eaf6056811': Add a unit test for StaticIpConfiguration.
| | * Add a unit test for StaticIpConfiguration.Lorenzo Colitti2015-02-041-0/+225
| | | | | | | | | | | | Change-Id: I68c735def8a242da0c8f95b7c5ea680ed902dab7
* | | am 3a6d8f54: am 90d5bd8d: am feb362a5: am a0d3bfbe: am 5c9d0de1: am ↵Jon Larimer2015-01-301-5/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | 545dd853: am 9a425aa7: am 159aa735: am d4031809: am 48c95c43: Fix build breakage in older branches by avoiding <> notation automerge: ff526fa * commit 'ff526fa7106fd45bfc4f1606fe051000c5201920': Fix build breakage in older branches by avoiding <> notation
| * | am 3a6d8f54: am 90d5bd8d: am feb362a5: am a0d3bfbe: am 5c9d0de1: am ↵Jon Larimer2015-01-301-5/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 545dd853: am 9a425aa7: am 159aa735: am d4031809: am 48c95c43: Fix build breakage in older branches by avoiding <> notation * commit '3a6d8f5473f2451a0bdf13d4cc1d31e419d23f0c': Fix build breakage in older branches by avoiding <> notation
| | * \ am feb362a5: am a0d3bfbe: am 5c9d0de1: am 545dd853: am 9a425aa7: am ↵Jon Larimer2015-01-301-5/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 159aa735: am d4031809: am 48c95c43: Fix build breakage in older branches by avoiding <> notation * commit 'feb362a5d194b30226caf2efbaae77991007c65c': Fix build breakage in older branches by avoiding <> notation
| | | * \ am 5c9d0de1: am 545dd853: am 9a425aa7: am 159aa735: am d4031809: am ↵Jon Larimer2015-01-301-5/+5
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 48c95c43: Fix build breakage in older branches by avoiding <> notation * commit '5c9d0de174caf151937f19aa6898f60bce3fb4f4': Fix build breakage in older branches by avoiding <> notation
| | | | * \ am 545dd853: am 9a425aa7: am 159aa735: am d4031809: am 48c95c43: Fix build ↵Jon Larimer2015-01-301-5/+5
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | breakage in older branches by avoiding <> notation * commit '545dd853bffbf778a0a44816ac6ed381b13f2158': Fix build breakage in older branches by avoiding <> notation
| | | | | * \ am 159aa735: am d4031809: am 48c95c43: Fix build breakage in older branches ↵Jon Larimer2015-01-301-5/+5
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by avoiding <> notation * commit '159aa73574804967aded45d06b70df5a8dd64a58': Fix build breakage in older branches by avoiding <> notation
| | | | | | * \ am d4031809: am 48c95c43: Fix build breakage in older branches by avoiding ↵Jon Larimer2015-01-301-5/+5
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <> notation * commit 'd403180997898c98f0be15b810c4c9dd9002f92c': Fix build breakage in older branches by avoiding <> notation
| | | | | | | * | Fix build breakage in older branches by avoiding <> notationJon Larimer2015-01-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5e3d523dac1f364f52f0d2cab479c1705d667e5a
| | | * | | | | | am ea63fd7f: am 88add689: am a5ccca24: am 2982d648: am de9a76ed: am ↵Jon Larimer2015-01-291-0/+263
| | | |\ \ \ \ \ \ | | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc731e6e: Merge "Fix ParceledListSlice to enforce the same concrete types among its elements." into jb-mr2-dev * commit 'ea63fd7f9b4bb2701c9d12ab8775867dbdeefcf1': Fix ParceledListSlice to enforce the same concrete types among its elements.
| | | | * | | | | am 88add689: am a5ccca24: am 2982d648: am de9a76ed: am fc731e6e: Merge "Fix ↵Jon Larimer2015-01-291-0/+263
| | | | |\ \ \ \ \ | | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ParceledListSlice to enforce the same concrete types among its elements." into jb-mr2-dev * commit '88add68942694fc643518bcf5c26f6c3df7e9aa0': Fix ParceledListSlice to enforce the same concrete types among its elements.
| | | | | * | | | am 2982d648: am de9a76ed: am fc731e6e: Merge "Fix ParceledListSlice to ↵Jon Larimer2015-01-291-0/+263
| | | | | |\ \ \ \ | | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enforce the same concrete types among its elements." into jb-mr2-dev * commit '2982d64802ed0d5b59130680c43485e9d7862e50': Fix ParceledListSlice to enforce the same concrete types among its elements.
| | | | | | * | | am de9a76ed: am fc731e6e: Merge "Fix ParceledListSlice to enforce the same ↵Jon Larimer2015-01-291-0/+263
| | | | | | |\ \ \ | | | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | concrete types among its elements." into jb-mr2-dev * commit 'de9a76ed997c300a6c5f2f82c517719503af9045': Fix ParceledListSlice to enforce the same concrete types among its elements.
| | | | | | | * | Fix ParceledListSlice to enforce the same concrete types among its elements.Adam Lesinski2015-01-281-0/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug:17671747 Change-Id: I896f75738e5b464ccb6c03290f139cc2fa72f966 (cherry picked from commit 3df1c38ee098872352086e03d6f1adb16796ee29)
| * | | | | | | | am b5108949: am e4a031e3: Merge "New trick to install bad dex file."Ying Wang2015-01-201-2/+3
| |\ \ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | * commit 'b51089499c8c39fce47deccf70d3ea069c58b471': New trick to install bad dex file.
| | * | | | | | | New trick to install bad dex file.Ying Wang2015-01-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we use LOCAL_JAVA_RESOURCE_FILES to override the normally generated classes.dex with a bad dex file. Now as we have moved Java resource processing before running jarjar, dx would fail for the bad classes.dex inside the classes.jar. Instead we override the target specific variable PRIVATE_DEX_FILE to inject the bad dex file. (cherry-picked from commit f122d90c290c789e0d0085127beebdcf1935c127) Bug: 18837479 Change-Id: I73f82c8a15e1d8935d9c2f290ba9456184a56ec7