Commit Graph

101740 Commits

Author SHA1 Message Date
TreeHugger Robot
08f5841707 Merge "Add getTextClassifier perf test" into qt-dev 2019-04-05 18:04:23 +00:00
TreeHugger Robot
3b74731f4e Merge "Flag to configure model parameters" into qt-dev 2019-04-05 15:52:17 +00:00
TreeHugger Robot
7b0c0c7694 Merge "Catch ArrayIndexOutOfBoundsException in StateMachine.toString()" into qt-dev 2019-04-05 15:27:05 +00:00
Jeff Sharkey
10a222bf3c Merge "Fix isExternalStorageSandboxed() bug." into qt-dev 2019-04-05 15:18:23 +00:00
Todd Kennedy
6cf751cda5 Merge "fix nullability" into qt-dev 2019-04-05 14:16:37 +00:00
TreeHugger Robot
4c648a027f Merge "Sharesheet - Limit EXTRA_INITIAL_INTENTS to 2" into qt-dev 2019-04-05 14:10:41 +00:00
Tony Mak
20fe187bdf Flag to configure model parameters
The objective is to allow us to push model parameters by using a settings flag,
without the need of pushing a new model file.

Settings.Global#TEXT_CLASSIFIER_ACTION_MODEL_PARAMS stores a comma
separated string that contains these three fields:
1. required_model_version
2. required_locales
3. serialized_preconditions

To ensure serialized_preconditions is applied to the target model file,
TextClassifierImpl only applies the serialized_preconditions when
required_model_version and required_locales are both met.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: adb shell settings put global text_classifier_action_model_params 'required_model_version=0,required_locales=en,serialized_preconditions=FAAAAAAADgAIAAAAAAAAAAAABAAOAAAAAAAAAA=='
      Observe that the flag is actually applied in the model.
Test: Ensure that finalize is called when the activity is dead.

BUG: 123616497

Change-Id: Ie42dcfeee705c83bbb693a5c1a0fedd0821df5e7
2019-04-05 14:35:13 +01:00
TreeHugger Robot
f8aeee04c3 Merge "Stores serialized entity data to the extras" into qt-dev 2019-04-05 13:26:20 +00:00
Narayan Kamath
fb1a20e4fb Merge "Fix rollbacks in multi-user case." into qt-dev 2019-04-05 12:39:42 +00:00
Matt Pietal
4e2e36323d Sharesheet - Limit EXTRA_INITIAL_INTENTS to 2
Will eventually merge with suggested apps

Bug: 129979509
Test: ChooserActivityTest
Change-Id: I0e5f5a42155c83c77c6f6e355289218bc88033e7
2019-04-05 08:32:47 -04:00
Richard Uhler
82913b7123 Fix rollbacks in multi-user case.
There are a few assumptions in the rollback manager that fail in the
multi-user case that need to be fixed:
* getAllSessions only returns sessions for the specific user.
* Session callbacks are only called on sessions associated with the
  registered user.
* getPackageInfo only returns info for the specific user.

Fix these issues so that rollbacks will work properly, in particular
when the initial install session is owned by a non-system user.

Bug: 129809507
Bug: 129397974

Test: On single user device: atest RollbackTest StagedRollbackTest
Test: On primary user of multi-user device: atest RollbackTest StagedRollbackTest
Test: On multi user device manually:
    adb install RollbackTestAppAv1.apk
    adb install --user 10 --enable-rollback RollbackTestAppAv2.apk
    -- verify the install succeeded --
    adb shell pm rollback-app com.android.tests.rollback.testapp.A
    -- verify the rollback succeeded --

Test: On multi user device manually:
    adb install RollbackTestAppAv1.apk
    adb install --staged --user 10 --enable-rollback RollbackTestAppAv2.apk
    adb reboot
    -- verify the install succeeded --
    adb shell pm rollback-app com.android.tests.rollback.testapp.A
    adb reboot
    -- verify the rollback succeeded --

(cherry picked from commit d81ff97866)

Merged-In: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
Change-Id: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
2019-04-05 11:54:44 +00:00
Susi Kharraz-Post
884e901cf4 Merge "Fast follow-on unit tests for HashedStringCache" into qt-dev 2019-04-05 11:35:38 +00:00
Kevin Chyn
12852fdc7d Merge "Add secure setting to cache attention" into qt-dev 2019-04-05 06:33:37 +00:00
TreeHugger Robot
9620e07e4f Merge "Sharesheet - Fix portrait -> landscape switch" into qt-dev 2019-04-05 05:33:13 +00:00
TreeHugger Robot
410d783f5b Merge "Add draw props back to greylist" into qt-dev 2019-04-05 03:30:48 +00:00
Kevin Chyn
b6d2d91f2d Add secure setting to cache attention
Fixes: 129912479

Test: Builds
Change-Id: I48979c65fc33bb5d70198f549a0ea863257e0247
2019-04-04 17:31:25 -07:00
TreeHugger Robot
cbf999bd4f Merge "Camera: Clarify camera1 API behavior for getNumberOfCameras" into qt-dev 2019-04-05 00:13:29 +00:00
Makoto Onuki
5e7b4175b7 Merge "Change ISE to AssertException, which is more suitable." into qt-dev 2019-04-04 23:56:29 +00:00
Makoto Onuki
58d5470580 Change ISE to AssertException, which is more suitable.
Bug: 129139241
Bug: 129721058
Test: Treehugger
Change-Id: I12e97f37a58e1d88731a9bddd933abeb8c1169c1
2019-04-04 13:42:47 -07:00
Quang Luong
abe10b3e62 Catch ArrayIndexOutOfBoundsException in StateMachine.toString()
StateMachine.toString() calls mSmHandler.getCurrentState(). In the
rare case when mStateStackTopIndex is -1 due to the StateMachine being
not yet initalized, this results in an ArrayIndexOutOfBoundsException.

Bug: 124858416
Test: none

Change-Id: Id558be95b6e12d8a923d325bca5f6f6d7f942b22
2019-04-04 13:12:26 -07:00
Matt Pietal
399e8c74ee Sharesheet - Fix portrait -> landscape switch
Calculating the reserved height was using the wrong figures. Expose
the correct reserved alwaysShow height, and use it to determine the
offset for scrolling.

Bug: 120419081
Test: manual, rotate device
Change-Id: I21fd9fa8494a258d17f6002f79967aacc0efde34
2019-04-04 15:49:48 -04:00
Susi Kharraz-Post
a7f614519e Fast follow-on unit tests for HashedStringCache
Unit tests for HashedStringCache that was commited in earlier CL
ag/6867725 . This is testing the various inputs and expected outputs.
Testing also revealed some vulnerability for invalid input so added
validation in the code under test.

Bug: b/129870147
Test: This is the test file
Change-Id: I7387f808df87a869f81339cd4aea99b23dfc06bd
2019-04-04 15:15:33 -04:00
Yohei Yukawa
49efa718a8 Introduce a result class for IStatusBarService#registerStatusBar()
This is a preparation to fix an issue that IME cannot enable light
navigation bar on direct-reply.

The initial state of StatusBar client is provided as return values of
IStatusBarService#registerStatusBar().  However, the way for the
client to receive the return values is to rely on "out" parameters in
the Binder method as follows.

    void registerStatusBar(IStatusBar callbacks,
            out List<String> iconSlots,
            out List<StatusBarIcon> iconList,
            out int[] switches,
            out List<IBinder> binders,
            out Rect fullscreenStackBounds,
            out Rect dockedStackBounds);

The issue is that if I want to add a new parameter into
StatusBarManagerService to fix Bug 122439339, then it needs to be
notified back to the client via one of these out values, e.g. a new
element in "switches", which is hard to understand and maintain.

It'd be better to introduce a dedicated return object as follows.

    RegisterStatusBarResult registerStatusBar(IStatusBar callbacks);

This is a purely mechanical code clean-up.  Hence there should be no
behavior change.

Bug: 122439339
Test: presubmit
Change-Id: Ib1c0ae8f591ca09d0bce7a39f85ba57aad386e47
2019-04-04 11:49:02 -07:00
Todd Kennedy
7ea2e485fe fix nullability
Bug: 126701951
Test: It builds, it runs
Merged-In: I43e02551ced8a6aa51b84dd8df7e57e75e1d58a9
Change-Id: I43e02551ced8a6aa51b84dd8df7e57e75e1d58a9
2019-04-04 18:11:01 +00:00
John Reck
0c7027d86b Add draw props back to greylist
Bug: 129957634
Test: none
Change-Id: Iaf2d7f8dc0f5d6f1b0dc12025210820bf8255f67
2019-04-04 18:05:10 +00:00
Jeff Sharkey
e9fcabcaa1 Fix isExternalStorageSandboxed() bug.
It needs to use the same STOPSHIP logic for consistency with the
two other enforcement sites across the OS.

Bug: 129487770
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I7a3fa836e0795912c264aae58a55472ffae3d8c3
2019-04-04 11:19:24 -06:00
Tony Mak
751afc9821 Add getTextClassifier perf test
This helps us to evaluate the fix.

BUG: 129695635

Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh

Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
2019-04-04 17:09:58 +01:00
Shuzhen Wang
64ed101290 Camera: Clarify camera1 API behavior for getNumberOfCameras
Expose at most 1 camera ID per facing for all logical-physical camera ID
groups.

Test: Build and read docs
Bug: 113705942
Change-Id: I86a06562eafd600d351d8db2582a613b3323404c
2019-04-04 15:55:37 +00:00
Tony Mak
fdb3554e5e Stores serialized entity data to the extras
libtextclassifier (native side) will serialize the extra entity information
(like parsed datetime) into a byte array and passed it to framework.
Framework puts it to the extras Bundle of result object, i.e. TextClassification
and ConversationActions.

In the future, we will provide a library (maybe AndroidX) to deserialize the
string and return structured objects.

BUG: 129119759

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

Change-Id: I8091a1038691419825f5d6da3562b8ba81787dc7
2019-04-04 10:24:34 +00:00
Jorim Jaggi
a6aabacbb5 Force app to draw navigation bar background
For gestural navigation, having a small bar drawn by SystemUI
looks really really weird. Since we force the status bar
background to be drawn in the client, we can also force the
navigation bar background without expecting any compat issues.

Bug: 129751541
Test: Open legacy app, ensure black is drawn in the client
Change-Id: I9cd4c5dd799324ff10bf9d28750e8f238ab1e459
(cherry picked from commit 461bb11371)
2019-04-04 07:27:10 +00:00
Yin-Chia Yeh
796820aa92 Merge "Camera: add QCIF resolution exception" into pi-dev
am: 5b09928b22

Change-Id: I20e60ef6d84c969b1651e449f5a076183d38a7c9
2019-04-04 00:14:38 -07:00
Susi Kharraz-Post
0c70be6738 Merge "Add logging for direct share target" 2019-04-04 00:03:56 +00:00
Kevin Chyn
9af1448d50 Merge "Make get/set feature async between settings and service" 2019-04-03 23:46:14 +00:00
TreeHugger Robot
259c73c007 Merge "Move NetworkStatsFactory into service directory" 2019-04-03 23:44:26 +00:00
Todd Kennedy
605d6b1d46 Merge "Return the update timestamp in getStagedSessions()" 2019-04-03 22:57:48 +00:00
TreeHugger Robot
2ae133285b Merge "Fix Global Actions animations, and use old power menu when panel is disabled. Also tweak feature flags setup to use old flag as a force option for debugging." 2019-04-03 22:36:29 +00:00
Christian Wailes
7df27e9e4e Merge "Adds Zygote.initNativeState" 2019-04-03 22:35:35 +00:00
Hyunyoung Song
b5e014a2fc Merge "Fetch roundIcon|icon depending on RRO overlayed config_useRoundIcon" 2019-04-03 22:18:35 +00:00
TreeHugger Robot
7e3051ca4e Merge "Fix NPE in RNA#callOnFinished" 2019-04-03 22:06:55 +00:00
TreeHugger Robot
7988315b01 Merge "Add support for /odm/overlay" 2019-04-03 21:56:39 +00:00
Susi Kharraz-Post
14cbfcdbd0 Add logging for direct share target
To answer the question if users share mainly with 1 or 2 direct targets
or with a multitude of contacts, we need to log the direct target +
package name. For privacy, this gets hashed with a salt that expires by
default every 7 days. The PH flag will allow us to change the expiration
time if we obtain PWG permission for that.

Bug: 126365511
Test: New test in ChooserActivityTest + manual testing of consistency
and flag rollout using adb shell device_config put systemui
hash_salt_max_days with multiple values

Change-Id: Ib4255b3eb39ca91ccb5803dc036ffe0ea83a27c9
2019-04-03 17:54:25 -04:00
Chenbo Feng
061cec7755 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 14:28:41 -07:00
Nicolas Geoffray
5d5972263f Merge "Use Class.forName instead of ClassLoader.loadClass." am: dc489aba0e am: 1b7fb8f7ae
am: cb6605192c

Change-Id: I953c2bb97dda4ca654e552d58bf56d884d609fc0
2019-04-03 14:22:03 -07:00
Chris Wailes
6d482d541e Adds Zygote.initNativeState
This patch replaces three seperate native initialization functions with
a single function, reducing the number of times we need to cross the JNI
boundary.  In addition this loads an empty performance profile for the
zygote to address b/129704892.

Bug: 129704892
Test: make & boot
Test: Treehugger
Change-Id: I0413f554e0963a714e0b4de3196d31ffe6775a3a
2019-04-03 13:42:35 -07:00
Aaron Heuckroth
c792661840 Fix Global Actions animations, and use old power menu when panel is disabled.
Also tweak feature flags setup to use old flag as a force option for debugging.

Test: Automated tests pass. Long-press power menu without plugin installed from different device orientations -- menu should animate in from the closest screen edge in all orientations and rotate correctly when device is rotated. Repeat after enabling the settings_global_actions_force_grid_enabled option in Feature Flags to ensure the correct behavior persists when using the new grid layout.

Fixes: 126444760
Fixes: 129698948

Change-Id: I9ac387244a5904f832c5d8b6c40362c00c6a22a2
2019-04-03 16:33:55 -04:00
Nicolas Geoffray
cb6605192c Merge "Use Class.forName instead of ClassLoader.loadClass." am: dc489aba0e
am: 1b7fb8f7ae

Change-Id: I41141b6fc6934faf086ea930b19539a0daba8298
2019-04-03 13:14:39 -07:00
Ryan Mitchell
e0c0c883aa Merge changes from topic "rro-cts"
* changes:
  RRO CTS Test APIs
  Relax restrictions on non-system overlays
2019-04-03 20:04:41 +00:00
Jean-Michel Trivi
c6d7460140 Merge "PlayerBase: conditional muting on OP_PLAY_AUDIO changes" 2019-04-03 19:58:59 +00:00
Nicolas Geoffray
1b7fb8f7ae Merge "Use Class.forName instead of ClassLoader.loadClass."
am: dc489aba0e

Change-Id: I80f1488c7cca5ce68555786a7951f30172c905f2
2019-04-03 12:44:56 -07:00
TreeHugger Robot
c2bb94fc29 Merge "Add package name when loadModules and attach." 2019-04-03 19:36:20 +00:00