Commit Graph

92987 Commits

Author SHA1 Message Date
Riddle Hsu
d3062cbf41 Skip execution of transactions on a destroyed activity
An Activity may not yet create on client side, there is another
launch request with flags to clear task, then a destroy transaction
is scheduled. If client side keeps blocking until destroy timeout,
the token on server side will be removed. When client begins to
handle the first creation, it will report its activity token to
server that causes IllegalArgumentException because there is no
matched ActivityRecord.

Bug: 32375307
Test: atest FrameworksCoreTests:TransactionExecutorTests
Change-Id: I1b7e0c2863b13091c3fd50df602ff31ae02ff38d
2018-07-12 11:54:47 +08:00
TreeHugger Robot
d9afa50863 Merge "Revert "Add UrlSpanFactory to Linkify"" 2018-07-08 00:10:34 +00:00
Ian Pedowitz
0a35c20bc3 Revert "Add UrlSpanFactory to Linkify"
This reverts commit ad4883bb1b.

Reason for revert: b/111218263

Bug: 28536972
Bug: 32613009
Bug: 29150779
Change-Id: Idc1621d472d742929f56d10d72b077b774b9e56e
2018-07-07 22:02:29 +00:00
Siyamed Sinir
060828e616 Merge "Add UrlSpanFactory to Linkify" 2018-07-07 00:57:35 +00:00
zhouwenjie
d707da9c77 Upate BatteryStats version after fixing mMinLearnedBatteryCapacity
calculation.

Bug: 111132682
Test: manual
Change-Id: Ie2964bbc8480c8758b7b54e25ec9e95a329a2285
2018-07-06 10:26:51 -07:00
Olivier Gaillard
d202011c37 Transforms uid to packages for the raw data
Test: manual

Change-Id: I8d6ef245bb42a1f1c058dc43e23e82f2a8b70264
2018-07-06 16:10:44 +01:00
TreeHugger Robot
460f4c24d1 Merge "Move displayId into InputEvent" 2018-07-05 18:28:56 +00:00
Siarhei Vishniakou
91fa08ff1b Move displayId into InputEvent
Now both KeyEvent and MotionEvent will contain displayId. This will help
with dispatching input events to specific displays. There are use cases
where a particular input device is used for a specific display only, and
it sends key events to the system. This will help with those usages.

Test: atest view.MotionEventTest view.KeyEventTest
Bug: 64258305
Change-Id: I75891037617ed60820d60736216a0d615ab5e3b0
2018-07-05 16:29:51 +01:00
Neil Fuller
6e162540ab Merge "Track constructor changes in libcore/" am: f94eb29500 am: 67dcf6da3c
am: 9ca5d6f0a0

Change-Id: I7e7115799180d17e4ad6468e155aed79fc8600cb
2018-07-05 05:34:45 -07:00
Neil Fuller
9ca5d6f0a0 Merge "Track constructor changes in libcore/" am: f94eb29500
am: 67dcf6da3c

Change-Id: I1205219e1fead95ecdb8f9ce5d503ec416baf4c2
2018-07-05 05:25:35 -07:00
Neil Fuller
67dcf6da3c Merge "Track constructor changes in libcore/"
am: f94eb29500

Change-Id: I344d9210bd173f78651318366c852f65afe969d6
2018-07-05 05:14:26 -07:00
Neil Fuller
33e7250f1f Merge "Track changes in libcore to remove a constructor" 2018-07-05 10:27:40 +00:00
Neil Fuller
f94eb29500 Merge "Track constructor changes in libcore/" 2018-07-05 08:57:13 +00:00
Lucas Dupin
4b4c530ced Revert "Add theme mode design let user can choose theme self"
The CL was intended only for P as a temporary solution.
This reverts commit f0800fa3bd.

Test: switch wallpapers, observe theme
Bug: 110758454
Change-Id: If10e4d87b6ddac10063b2671abd99e0baccdf92e
2018-07-04 11:22:18 -07:00
Neil Fuller
8a1683f0a2 Track changes in libcore to remove a constructor
Track changes in libcore to remove a constructor + lint
import order changes. Instead of the constructor a utility
method is introduced.

Test: Build / boot
Bug: 111055375
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
2018-07-04 09:10:55 +01:00
Tiger Huang
beac1471aa Merge "Don't flash system bars while showing an immersive app on lockscreen" 2018-07-04 03:06:31 +00:00
TreeHugger Robot
9a8e27a915 Merge "Allow UiAutomation to adopt the shell permission indentity" 2018-07-04 03:00:14 +00:00
TreeHugger Robot
2a04303567 Merge "Update mMinLearnedBatteryCapacity when necessary." 2018-07-04 02:32:37 +00:00
Svet Ganov
d873ae62c4 Allow UiAutomation to adopt the shell permission indentity
For testing we often need to run shell commands. This can be done
today via running a shell command from an instrumentation test
started from the shell. However, this requires adding shell commands
which are not in the API contract, involve boilerplate code, require
string parsing, etc.

This change allows an instrumentation started from the shell to
adopt the shell UID permission state. As a result one can call APIs
protected by permissions normal apps cannot get by are granted to
the shell. This enables adding dedicated test APIs protected by
signatures permissions  granted to the shell.

Test: cts-tradefed run cts-dev -m CtsUiAutomationTestCases
          -t android.app.uiautomation.cts.UiAutomationTest#testAdoptShellPermissions

bug:80415658

Change-Id: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
2018-07-03 16:39:44 -07:00
zhouwenjie
8a871d818b Update mMinLearnedBatteryCapacity when necessary.
Currently mMinLearnedBatteryCapacity is only updated once (when it's
-1). We check the minimum of mMinLearnedBatteryCapacity and the new
chargeFullUah reading but never update mMinLearnedBatteryCapacity to the
new value.

Bug: 111132682
Test: manual
Change-Id: I1680e7a4bdf9176feb2a2dcc9f2c10c829202bda
2018-07-03 16:17:02 -07:00
Olivier Gaillard
f82d2e7369 Tracks exception count by class name.
The goal is to figure out if it would be worth monitoring these
exceptions. If exception types are only caller issues like
SecurityException and IllegalArgumentException, it is probably not worth
it. If we can find NPE or internal exceptions it would be worth
uploading the exceptions through dropbox.

Test: unit test

Change-Id: I779d43a0e6ca1a33535b90809491675420a51726
2018-07-03 22:22:42 +01:00
Wale Ogunwale
20a65c4e7b Merge "Break direct calls to UserController object in AMS from activity classes (12/n)" 2018-07-03 20:50:18 +00:00
TreeHugger Robot
080faba4f4 Merge "Stop restoring spell checker settings" 2018-07-03 20:34:32 +00:00
Neil Fuller
bfef432a69 Merge "Make Half class use public APIs" am: 7e957e57b7 am: 04c66489bc
am: 8b14d33acb

Change-Id: I6eb87843c251f726de2feb6827c54c8f7b75f1fe
2018-07-03 13:27:01 -07:00
Neil Fuller
8b14d33acb Merge "Make Half class use public APIs" am: 7e957e57b7
am: 04c66489bc

Change-Id: I35fa0a22465885a47612601d541afb366b5953ec
2018-07-03 13:17:31 -07:00
Neil Fuller
04c66489bc Merge "Make Half class use public APIs"
am: 7e957e57b7

Change-Id: I7f41f07ed5d35a0c538c90b49b4500ba9952f74d
2018-07-03 13:08:26 -07:00
Neil Fuller
038b20c99b Track constructor changes in libcore/
The 2-arg constructor is being removed.

Test: build / boot
Bug: 111055375
Change-Id: I72413a8c7885f9514a88f59deb649fa755deff92
2018-07-03 19:22:45 +01:00
Siyamed Sinir
ad4883bb1b Add UrlSpanFactory to Linkify
Enable API user to create their own URLSpan for Linkify operations.

Test: atest android.text.util.cts.LinkifyTest
Test: atest android.text.util.LinkifyTest

Bug: 28536972
Bug: 32613009
Bug: 29150779

Change-Id: Ia4495dc7e656044b91a79804d3b50a30cae98225
2018-07-03 10:53:16 -07:00
TreeHugger Robot
9445ca3ab9 Merge "Bugreport: Fix SystemUI service from being dumped twice 1/2" 2018-07-03 17:42:25 +00:00
Wale Ogunwale
86b7446c2b Break direct calls to UserController object in AMS from activity classes (12/n)
Make calls from activity classes go through ActivityManagerInternal
interface to case UserController instead of calling AMS.mUserController
object directly. Note that calls to UserController should not hold the
AMS lock.

Bug: 80414790
Test: Existing tests pass
Change-Id: Ie56f08d10b62d609e9b5e31f45b5f0d6eed3a9d4
2018-07-03 08:22:59 -07:00
TreeHugger Robot
e026b408b5 Merge "Track max CPU and latency of binder calls" 2018-07-03 11:11:27 +00:00
TreeHugger Robot
95e4e67dc6 Merge "Docs: generateKeyPair() can't be called from the main thread." 2018-07-03 08:32:23 +00:00
Tiger Huang
3404601e07 Don't flash system bars while showing an immersive app on lockscreen
Before applying this patch, when a show-when-locked immersive app is
showing, the system bars would quickly show and hide, which are
redundant to the user.

The root cause is that, for nav bar, we have a policy to show nav bar
if the width and height of status bar are MATCH_PARENT and status bar
has no PRIVATE_FLAG_KEYGUARD. When keyguard is becoming status bar,
its keyguard flag would be removed first, and then the height would
be changed to the bar height. So the nav bar would be shown between
these events. For status bar, we force showing it when it is expanded
by checking its width and height are MATCH_PARENT or not.

To fix the issue, this change introduces a new private flag which
indicates that the status bar window is now in an explicit expanded
state. We check this flag instead of checking the width and height of
status bar.

This change also fix a bug that: when AOD is enabled, if the
foreground app has FLAG_SHOW_WHEN_LOCKED, FLAG_TURN_SCREEN_ON, and
FLAG_FULLSCREEN, clicking on the power key would make it show the app
again instead of AOD. (not 100%, but chances)

Bug: 80147982
Test: 1. go/wm-smoke
      2. Launch a show-when-locked turn-screen-on immersive app on
         AOD, and see if any system bar flashes.
      3. Launch a show-when-locked turn-screen-on immersive app on
         lockscreen, and see if any system bar flashes.
      4. a. Enable AOD in Settings.
         b. Open a show-when-locked turn-screen-on immersive app.
         c. Click on power key, and see if AOD shows.
      5. Launch an immersive app and drag down the status bar, see
         if nav bar keeps there as long as status bar is expanded.

Change-Id: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
2018-07-03 14:41:43 +08:00
TreeHugger Robot
9e01f4293c Merge "Add Feature Flag for Hearing Aid Profile" 2018-07-03 01:18:15 +00:00
TreeHugger Robot
b5ec0b8053 Merge "Add SHOW_SOURCE_PUSH_TO_TALK to indicate that the interaction service was invoked by a hardware button." 2018-07-02 23:42:54 +00:00
Jorim Jaggi
1f079b4f97 Merge "Only use simple rects for cutout region" into pi-dev am: 4764921dcc
am: b7dc212a61

Change-Id: I2af32c72ea859ff908fa30b5de1e722a99b28479
2018-07-02 14:58:32 -07:00
Jorim Jaggi
b7dc212a61 Merge "Only use simple rects for cutout region" into pi-dev
am: 4764921dcc

Change-Id: Icfb41008189d5c01f90afd4992428433043b4c4e
2018-07-02 14:47:09 -07:00
Vishnu Nair
c69cd4480e Bugreport: Fix SystemUI service from being dumped twice 1/2
Bug: 110490179
Fix: 110490179

Test: Manual test dumpsys activity
  adb shell dumpsys activity service all-platform-non-critical
  adb shell dumpsys activity service all-platform
  adb shell dumpsys activity service
  Take bugreport and check contents

Test: atest FrameworksCoreTests:DumpUtilsTest

Change-Id: I9173d3fa0cc3aaf42e3ab03e7e2892cf4188b13b
2018-07-02 14:29:31 -07:00
Winson Chung
8f54a7c515 Merge changes Ibae2de51,I1d6718d9
* changes:
  Allow share/edit screenshot actions from lockscreen
  Prevent clobbering of activity options bundle when merging
2018-07-02 21:04:39 +00:00
TreeHugger Robot
ca48d74547 Merge "Make getDimension's Javadoc say it returns px." 2018-07-02 20:29:29 +00:00
TreeHugger Robot
f574d538c1 Merge "Add a package declaration to RulesState" 2018-07-02 19:28:22 +00:00
Yohei Yukawa
1893bd162a Stop restoring spell checker settings
This CL logically reverts the following CL (and some subsequent
changes) to stop restoring spell checker related secure settings.

 * Ib8382f0296f0726b64494d3b1fd8237e13adb540
   06cbaddb87

Reason for revert:
Although we believe it would be great if we can seamlessly migrate to
a new phone with keeping spell checker related settings, there still
remain several tricky scenarios.

 * We are not ready to distinguish whether a certain spell checker
   related setting was explicitly set by the user or programmatically
   set by some components in the previoud device.  This includes the
   case where TextServicesManagerService (TSMS) itself automatically
   updates those settings e.g. by selecting a default spell checker
   service from the pre-installed ones.  We are not sure if trying to
   migrate such an auto-selected setting to a new device actually
   makes sense, especially if it happens without any user
   confirmation.

 * We have a strict rule about what spell checker service can be
   selected automatically, and the rule has been that only
   pre-installed spell checker services can be automatically selected
   by the system, unless some system components that have
   WRITE_SECURE_SETTINGS permission overrides it. Mechanically
   selecting a spell checker service just because it was enabled in
   the previous device may not fit this model well.

 * Unlike IMEs, currently the Android OS allows only one spell checker
   service to be enabled.  This means that if the new device doesn't
   have the corresponding spell checker service, the user will lose
   spell checking functionality even if the device pre-installs
   functional spell checker service.  This problem is hard to notice
   because unlike IMEs spell checker service does not have its own UI.

 * Also unlike IMEs, spell checker related secure settings are still
   hidden and not published as public APIs.  Those settings do not
   have no official compatibility story across devices yet.

 * It is also possible that the default spell checker service in the
   previous device is not published to all the devices thus there is
   no way for the the new device to install it.

This CL therefore excludes spell checker related settings from
backup/restore, as a short-term answer to above scenarios until we
come up with better ideas to deal nicely with them.

Bug: 110367605
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Change-Id: I8e4a0d4b3b758a84d5a075fa52851b1e8dd707eb
2018-07-02 11:31:42 -07:00
TreeHugger Robot
c0b67c9385 Merge "Add more data (fg services, associations) to procstats." 2018-07-02 17:30:22 +00:00
TreeHugger Robot
1a81a7457b Merge "Allow 0sp text size in xml for TextView" 2018-07-02 17:02:20 +00:00
Jorim Jaggi
606405180f Only use simple rects for cutout region
Otherwise there is a big performance hit in all kinds of
situations where we do operations with the region, specifically
when:

- updating input windows
- insetting the cutout during layout
- touch dispatch

Test: DisplayCutoutTest, WmDisplayCutoutTest
Bug: 110464019
Bug: 110452325
Change-Id: I94a25c3794ecd33b8b7204ca308ac91623498f13
2018-07-02 17:58:10 +02:00
Olivier Gaillard
11965ede90 Track max CPU and latency of binder calls
Test: unit tested

Change-Id: I1429e8c34e9cb0572975fda3ec18e85d6caf3cad
2018-07-02 15:50:57 +01:00
TreeHugger Robot
19bbcfff1e Merge "Only play in-call notification if ringer is normal" 2018-07-02 14:31:31 +00:00
Mihai Popa
f03b7543c7 Allow 0sp text size in xml for TextView
Before this CL, when TextView's textSize attribute was set to 0sp in
XML, the text would still be visible on the screen, as the actual
textSize set was non zero. On the other hand, if the text size was set
to 0sp programmatically, the text would not be visible. This was a P
regression, as on O the text would be invisible in both cases.

This CL fixes the attribute reading stage in TextView, allowing the
application of a 0 text size on the view.

Bug: 110251171
Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I3798361e182f45a67cd0a69d40e09e559375aa20
2018-07-02 12:58:22 +00:00
Neil Fuller
f9d88dfac1 Make Half class use public APIs
Half has a dependency on an internal sun.misc.FloatingDecimal
that can be replaced by an equivalent call on java.lang.Float
(which calls through to FloatingDecimal).

Any performance hit is worth it for a smaller API surface.

Bug: 111055375
Test: Build
Change-Id: Iecdf3aa9414922a77edbdc439b0c2b88033b3af8
2018-07-02 12:04:39 +01:00
TreeHugger Robot
ce77407144 Merge "StrictMode to catch storage while locked." 2018-06-30 22:04:26 +00:00