2215 Commits

Author SHA1 Message Date
Alison Cichowlas
2d89c243da Tron logging - Fix isValidValue to match its name, allow nulls.
Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics/LogMakerTest.java
Change-Id: I92567e1873c5178606ac88135b5934d760b4ec24
2017-01-25 10:56:33 -05:00
Jeremy Joslin
ba24273401 Implemented network score cache filtering.
NetworkScoreCaches registered with a filter type will now only
receive updates that match their filter criteria.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34127291
Change-Id: I3d5e6e57b6682707b0734259a2530658ad75dbb7
2017-01-24 17:33:47 -08:00
Chris Wren
5e02bca5cb Merge "Move MetricsReader to SystemApi" 2017-01-24 20:21:09 +00:00
Yohei Yukawa
7383ce62ee Merge "Fix ImeSubtypeListItem#compareTo()" 2017-01-24 16:37:09 +00:00
Chris Wren
b62371434c Move MetricsReader to SystemApi
Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics  && runtest --path frameworks/base/core/tests/coretests/src/com/android/internal/logging/legacy/
Change-Id: If55f0444d5a836f24234182d298ebc128643efc1
2017-01-24 11:07:37 -05:00
Alison Cichowlas
3812446093 Merge "Tron - Omit overlong lines and warn when doing so." 2017-01-24 14:39:30 +00:00
Yohei Yukawa
410cc501b2 Fix ImeSubtypeListItem#compareTo()
It turns out that ImeSubtypeListItem#compareTo() does not satisfy the
contract of Comparable#compareTo(), which can trigger
IllegalArgumentException from Collections.sort() depending on the
runtime condition.

This CL makes it clear that two instances of ImeSubtypeListItem will be
compared with with those fileds in the following order.

  1. ImeSubtypeListItem#mImeName
  2. ImeSubtypeListItem#mSubtypeName
  3. ImeSubtypeListItem#mIsSystemLocale
  4. ImeSubtypeListItem#mIsSystemLanguage

Bug: 34255739
Test: adb shell am instrument -w -e class com.android.internal.inputmethod.InputMethodSubtypeSwitchingControllerTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I47f902cc8f5873926d238c30e462d08d7dbebcf7
2017-01-24 00:29:07 -08:00
Alison Cichowlas
38c4680aae Tron - Omit overlong lines and warn when doing so.
Test: updated LogBuilderTest

Change-Id: I0218acfacca53598a546cea5b3adeecd0d639031
2017-01-23 18:36:59 -05:00
Hakan Seyalioglu
9149dcaf41 Add ResolverActivity testing
Still very basic, but will be adding as we find more issues pop up.

Test: Ran the tests
Change-Id: Ib9863509d140ff425ce446ecc876f53494d4fd0e
2017-01-23 10:43:03 -08:00
Jiuyu Sun
417d30d88b Merge "Change the default behavior when MCC/MNC changes." 2017-01-20 22:58:25 +00:00
Holly Jiuyu Sun
b6d7695cf2 Change the default behavior when MCC/MNC changes.
By default, we don't restart the activity when MCC/MNC changes
even when they are not set in configChanges. If they want to
restart, set mcc or mnc in the new attribute restartOnConfigChanges.

Bug: 34258948
Test: Test in unit test(testGetActivityConfigChanges() in
      PackageParserTest.java) and on real device with
      changing the SIM card.

Change-Id: Icd6899597c9b8f2e5706e74373a0280d19150092
2017-01-20 13:50:51 -08:00
Amin Shaikh
d47e6e9067 Add additional fields to RecommendationRequest.
- Add networkId and timestamp for the last user selected network

Bug: 34467596
Test: runtest --path core/tests/coretests/src/android/net/RecommendationRequestTest.java
Change-Id: Ic81c1beede1a643cd428b6e5c57ed430a6b1ccc0
2017-01-19 18:00:37 -08:00
TreeHugger Robot
54df14956e Merge "Disable moving 3rd party apps to internal if not allowed." 2017-01-20 00:57:36 +00:00
Yao Chen
022b8eaa1d Disable moving 3rd party apps to internal if not allowed.
ag/1633903 added config_allow3rdPartyAppOnInternal flag to specify
whether 3rd party apps are allowed on internal storage. We need to
respect the flag when moving apps between storages.

Bug: 30980219

Test: Added ApplicationPackageManagertest

Change-Id: I0f8e76467b5071d70f40da28c2087e689c049c06
2017-01-19 15:32:41 -08:00
Jeremy Joslin
3ef77d3d0c Remove NetworkScorerAppManager.isCallerActiveScorer().
The method is no longer used.

Test: adb shell am instrument -e class android.net.NetworkScorerAppManagerTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 33781558
Change-Id: I2b4acd54a747bd480a4a91bac424d39e264ea882
2017-01-19 09:55:26 -08:00
TreeHugger Robot
96415fb603 Merge "Pass more data through the recommendation request." 2017-01-19 15:29:42 +00:00
Paul Duffin
648abd31e8 Merge "Prepare for removal of legacy-test from default targets" 2017-01-19 09:34:19 +00:00
Chris Wren
26ca65d425 create a metrics log reader for tests
Add parallel logs using the new format for the old MetricsLogger
calls. Deduplicate these after the new reader implementation is
complete.

Test: ./vendor/google/tools/systemui/systemui_test_cookbook.sh
Change-Id: If12e1b66b0ec5ac23bd65e44df4f3c6d6931e722
2017-01-18 23:38:22 -05:00
Mark Rathjen
c45df0d7c1 Merge "Roll forward SSAID Migration to be Per App/User Unique Values." 2017-01-19 04:21:47 +00:00
Mark Rathjen
d891f01d96 Roll forward SSAID Migration to be Per App/User Unique Values.
SSAID is currently shared across all applications for each
user on the device, giving developers the ability to track
users across multiple applications. Using SSAID for tracking
is an abuse of the original intention of the SSAID and has
inherent privacy concerns.

This change will make the SSAID unique per application, per
user on a device. To not affect applications installed prior
to this change they will retain the legacy SSAID value until
uninstalled and reinstalled again.

Across subsequent installations the application will receive
the same SSAID as long as the package name and signature remain
consistent.

Tested manually the following cases:
  - App retains the legacy sssaid after OTA.
  - App gets a new ssaid upon post-OTA installation.
  - App retrieves same ssaid across post-OTA unistall/reinstalls.
  - Different Apps receive different ssaids.
  - Factory reset removes ssaid data and generates a different
    ssaid after App install.
  - System retains legacy ssaid.

Bug: 34395671
Test: CTS tests passed, Manual testing passed

This reverts commit be43257005d086ff7d93c15dae22ac40bc0d545e.

Change-Id: Ibf20e7949304c30d65bb8aa24cdbbe6e104b1002
2017-01-19 04:10:37 +00:00
TreeHugger Robot
b55db281da Merge changes I1606b184,Id78dd4ab
* changes:
  Publish StorageManager#openProxyFileDescriptor API.
  Add StorageManager#openProxyFileDescriptor.
2017-01-19 02:15:34 +00:00
Mark Rathjen
5256e0556b Merge "Revert "SSAID Migration to be Per App/User Unique Values."" 2017-01-19 00:25:50 +00:00
Daichi Hirono
9fb00183a0 Add StorageManager#openProxyFileDescriptor.
The CL:

 * Adds StorageManager#openProxyFileDescriptor API.
 * Turns IProxyFileDescriptorCallback into a class so that it can provides
   default implementations.
 * Removes mActive state from FuseAppLoop, because the state will be managed at
   the MountService side.
 * Adds StorageManagerIntegrationTest to check if FUSE is correctly mounted or
   not. Since it's implementation details, CTS does not help to test the
   behavior.

Test: StorageManagerIntegrationTest
Bug: 29970149

Change-Id: Id78dd4abcf9325820e9c77c264f54bfa77b85a92
2017-01-19 09:24:00 +09:00
Mark Rathjen
be43257005 Revert "SSAID Migration to be Per App/User Unique Values."
This reverts commit 5514fb7aba781d8eabbbfc27a5d27a6b3a447b40.

Change-Id: I0d6b9b9ef3ecda3b7ec1b7160c492ec16c65b125
2017-01-18 23:08:48 +00:00
Jeremy Joslin
26a45e5b13 Pass more data through the recommendation request.
Expanding the API so it can accept the WiFi config of the currently
connected network (if any) and the set of connectable WiFi
configurations. Also renamed currentRecommendedWifiConfig to
defaultWifiConfig so the name was more representative of the
parameter's purpose and added more documentation throughout.

Test: adb shell am instrument -e class android.net.RecommendationRequestTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w com.android.networkrecommendation.tests/android.support.test.runner.AndroidJUnitRunner
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34387385
Change-Id: I1089b70303b0396def7e6bf3737fdc67e40c9dcd
2017-01-18 15:00:06 -08: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
Mark Rathjen
8bd15d1df2 Merge "SSAID Migration to be Per App/User Unique Values." 2017-01-17 23:57:17 +00:00
Mark Rathjen
5514fb7aba SSAID Migration to be Per App/User Unique Values.
SSAID is currently shared across all applications for each
user on the device, giving developers the ability to track
users across multiple applications. Using SSAID for tracking
is an abuse of the original intention of the SSAID and has
inherent privacy concerns.

This change will make the SSAID unique per application, per
user on a device. To not affect applications installed prior
to this change they will retain the legacy SSAID value until
uninstalled and reinstalled again.

Across subsequent installations the application will receive
the same SSAID as long as the package name and signature remain
consistent.

Tested manually the following cases:
  - App retains the legacy sssaid after OTA.
  - App gets a new ssaid upon post-OTA installation.
  - App retrieves same ssaid across post-OTA unistall/reinstalls.
  - Different Apps receive different ssaids.
  - Factory reset removes ssaid data and generates a different
    ssaid after App install.
  - System retains legacy ssaid.

Bug: 30979321
Test: CTS tests passed, Manual testing passed
Change-Id: I4acc190c14ec249e6365e05e7943148ed6f17f71
2017-01-17 11:22:07 -08:00
TreeHugger Robot
c70e581564 Merge "Add supportsDismissingSelfWindow attribute of IME" 2017-01-16 23:09:48 +00:00
Tadashi G. Takaoka
e12a6fff14 Add supportsDismissingSelfWindow attribute of IME
When a virtual keyboard is shown on some configurations (e.g. Phone),
the System UI may change the back navigation button to a different UI
element in order to dismiss the virtual keyboard. Such UI modification
is unnecessary when the virtual keyboard has a dismissing button on
its own window. This new attribute hints the System UI that the
virtual keyboard may have a UI element to dismiss itself. This will be
also useful for Tablet System UI which may not show a navigation bar
when a virtual keyboard is shown.

Bug: 34133139
Test: Add unit test InputMethodInfoTest
Change-Id: I0f6b130a7df57557e40b52a7b7ac00be965a17c3
2017-01-16 12:22:54 +09:00
Kang Li
9fa2a2cd46 Adds annotations to Intent, and enables ChooserActivity to rank apps
according to annotations.

Test: Unit tests and manul tests. More unit tests to be added.
Change-Id: I3cbfd0cc10007290585fa3e7e3c92e1731f1f7b8
2017-01-13 17:40:44 -08:00
Kang Li
96b39666a7 Merge "Adds tests for b/34095835." 2017-01-13 18:15:25 +00:00
Hakan Seyalioglu
8e0a405fad Merge "Only test the empty state in the right test." 2017-01-13 18:12:45 +00:00
Kang Li
64b018e0eb Adds tests for b/34095835.
Bug: 34095835

Test: reproduced the bug in b/34095835 to ensure that it is covered by
the test. Manually ran the tests.

Change-Id: I28a887341906dc443e1a854ddba51cd1b4daeead
2017-01-13 08:35:13 -08:00
Keisuke Kuroyanagi
846946ec06 Merge "Make selection end handle stick to selection at line end." 2017-01-13 06:39:22 +00:00
Hakan Seyalioglu
79b69f06d2 Only test the empty state in the right test.
Test: Ran the test

Change-Id: I03908540d85830dd1165f1672fe49716df55d7a0
2017-01-12 17:15:24 -08:00
Keisuke Kuroyanagi
7c263ddd58 Make selection end handle stick to selection at line end.
At line break, one offset can be mapped to two phisical
position: previous line end and next line start.
Previously, all cursor handles are placed at next line
start.
With this CL, selection end handle is placed at the
previous line end in such cases.

Test: FrameworksCoreTests
Bug: 21305922

Change-Id: I00d9f9a0cd417ca92534e93b3d3f655cd62f25d3
2017-01-12 19:24:18 +09:00
Alison Cichowlas
0f642d2709 Merge "Add a required main category for multi logs." 2017-01-11 17:54:13 +00:00
Santos Cordon
e89ba5222c Merge "Add Brightness setting for VR Mode." 2017-01-11 03:02:02 +00:00
Sunny Goyal
256dac14e2 Merge "Adding API to allow async inflaiton of AppWidget" 2017-01-11 01:19:33 +00:00
Santos Cordon
3107d29c8f Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Test: runtests frameworks-core
Test: Turn vr mode on and change brightness (should remain separate from
normal brightness)

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-10 17:16:04 -08:00
Alison Cichowlas
5cc5d8a3e9 Add a required main category for multi logs.
Test: updated LogBuilderTest

Change-Id: Ia5359e12a7a84af31d9a966f2c81fc943aadfbdb
2017-01-10 18:44:09 -05:00
Sunny Goyal
f960248951 Adding API to allow async inflaiton of AppWidget
Test: Manual and unit tests
adb shell am instrument -e class android.widget.AppWidgetHostViewTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 22839968
Change-Id: Id9cb56619653f43b9f755c881f5d0936375f9c87
2017-01-09 10:52:10 -08:00
Chris Craik
3f06c6de08 Revert "Revert "Fast-path for ViewGroup#invalidateChild, invalidate tests""
Bug: 33797688

This reverts commit 1cb8b08ae459fddc860e5863b0ec30a70682654e.

Change-Id: I322b550d65d48be4a99faf1790d138d26a996d7e
2017-01-09 18:30:35 +00:00
Chris Craik
2294458565 Merge "Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator" 2017-01-09 18:15:32 +00:00
Alison Cichowlas
0f961084ce Merge "Log wrapper for multi-metrics in tron." 2017-01-09 16:39:04 +00:00
Alison Cichowlas
803054dccb Log wrapper for multi-metrics in tron.
Test: Added new LogBuilderTest; runtest --path frameworks/base/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java

new file:   core/java/com/android/internal/logging/LogWrapper.java

Change-Id: I8c64a07b95ab9a70f39663d4ec54f9ec1bf49063
2017-01-06 20:24:16 -05:00
Chris Craik
686d972e12 Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator
Bug: 33797688
Test: new RenderNodeAnimatorTest passes

Other clients use RenderNodeAnimator now, so call
ensureTransformationInfo to be safe.

Change-Id: I837d6f5b00bb368d2bbf77b94d4c19a8426b9927
2017-01-06 16:18:31 -08:00
Yohann Roussel
dd6f64e3af Merge "Fix LOCAL_SDK_VERSION of 3 multidex apks" am: 43c98c74fe am: ef5d1cb3b4 am: 1c0070aa5d
am: 46848cada3

Change-Id: I8703a23d833bd54cff281e4ba29b236dc9d76125
2017-01-06 09:53:42 +00:00
Yohann Roussel
46848cada3 Merge "Fix LOCAL_SDK_VERSION of 3 multidex apks" am: 43c98c74fe am: ef5d1cb3b4
am: 1c0070aa5d

Change-Id: I94912d6e633d7869f31a0f6323d4bc7d8e901db8
2017-01-06 09:50:07 +00:00