Commit Graph

4166 Commits

Author SHA1 Message Date
Dianne Hackborn
b9a5e4ad30 Add new debug feature to automatically create heap dumps.
Not yet working, unless you turn off SELinux enforcing.
We need to update SElinux to allow the system process
to give apps access to /data/system/heapdump/javaheap.bin.

Currently watching can only be enabled through the shell,
such as:

adb shell am set-watch-heap com.android.systemui 1024

The last number is the process pss size in bytes, so this is
asking us to warn if it goes about 1K which will be all the
time.

Change-Id: I2089e5db2927afca0bf01a363c6247ee5dcb26e8
2015-03-06 16:42:03 -08:00
Christopher Tate
e51f79975e Merge "Don't enqueue allowBackup=false apps for full backup attempts" 2015-03-06 02:05:34 +00:00
Christopher Tate
77a2d78dbf Don't enqueue allowBackup=false apps for full backup attempts
We are correctly refusing to actually process apps for backup if they have
declared android:allowBackup="false" in their manifests, but we're still
wasting bookkeeping & a certain amount of work in tracking them as part of
the full backup queue.  Fix that; now we recognize that they shouldn't be
in the queue in the first place.

When reinflating the queue at boot time we also re-verify the participation
of each mentioned app so that we properly drop ones that have been uninstalled
or altered such that they are no longer full-data backup candidates.

Finally, if an app previously implemented key/value backup, so we think
we'll be running it in that mode in a future backup pass, but has been
updated to use the full-data path instead, we don't want to go ahead and
run a key/value pass on it.  Added a backstop check and proceed gracefully
in this situation.

(Also add bit more debug-build logging to LocalTransport)

Bug 19462310

Change-Id: I07ab4f2e68e92766d9e8f2595fa763c91193d743
2015-03-05 18:04:16 -08:00
George Mount
f2e9ca1f52 Merge "Handle null epicenters in EpicenterClipReveal." 2015-03-05 22:36:02 +00:00
George Mount
3c75db9961 Handle null epicenters in EpicenterClipReveal.
Bug 19617067

Change-Id: Ie288288f7a8e0c95ed07d8beb40b78f80048fa98
2015-03-05 14:33:37 -08:00
Dianne Hackborn
7d088428f3 Merge "Add new "daily stats" tracking to battery stats." 2015-03-04 00:57:54 +00:00
Dianne Hackborn
d4a8af7b6a Add new "daily stats" tracking to battery stats.
Currently is only used for tracking the daily charge
and discharge rates.  We keep up to 10 days of data.

Change-Id: I54e29e35ff60d9277da9e476cdab22f4a6d540bf
2015-03-03 15:38:58 -08:00
Chris Craik
4939e2bf36 Merge "Improve docs for drawable tint and color filters" 2015-03-03 16:46:48 +00:00
Chris Craik
bd3bfc5285 Improve docs for drawable tint and color filters
bug:19564477
Change-Id: I7e11baae2d4dd245965904c85b8855de71f6b6ac
2015-03-02 16:21:02 -08:00
John Spurlock
7b91c55b3f Merge "Remove unused imports in frameworks/base." 2015-03-02 20:43:50 +00:00
Clara Bayarri
727899fd0d Merge "Floating Toolbar: Wrap the ActionBar ActionMode handling." 2015-03-02 10:04:42 +00:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Mike Lockwood
238cba3593 Merge "Move ALSA utilities to com.android.internal.alsa package" 2015-02-27 18:42:13 +00:00
Alan Viverette
228fd600ce Merge "Implement landscape layout for time picker dialog" 2015-02-27 18:13:54 +00:00
Clara Bayarri
c57e7bc338 Floating Toolbar: Wrap the ActionBar ActionMode handling.
Refactor the ActionBar handling of startActionMode to allow handling by
the ActionModeWrapper, using the previously created infrastructure.

Things pending after this CL:
- Representing the floating type
- Supporting two ActionModes in parallel in DecorView, one of each type

Change-Id: Ic126e004bdef5d91d8be3d6a07eea34aa97a611e
2015-02-27 14:04:33 +00:00
Chris Banes
9cc36ca1b5 MenuItem, navigation and overflow icon tinting
- iconTint and iconTintMode attrs for MenuItem, with
  associated setters.
- navigationTint and navigationTintMode attrs for Toolbar
  with associated setters.
- overlflowTint and overflowTintMode attrs for Toolbar
  with associated setters.

BUG: 18126050
BUG: 19148351
BUG: 19305408

Change-Id: Ibd1fae7cdbc7a7c42809e52541fae5d8beb18e92
2015-02-27 08:56:04 +00:00
Mike Lockwood
464c655871 Move ALSA utilities to com.android.internal.alsa package
Change-Id: Icbd45ec97a942e44e60f8d4ba0bb58c97f85b55f
2015-02-26 13:50:08 -08:00
Alan Viverette
62c79e9a64 Implement landscape layout for time picker dialog
Adds support overriding default alert dialog panel elements by including
them in the dialog's custom content view, but no public API (yet!) since
the panel IDs have never been public. Some minor cleanup and refactoring
in TimePickerDialog. Removes Holo styles for "clock" and "calendar" style
pickers since they are new in Material. If the new styles are used against
Holo they will match Material but with Holo primary/accent colors.

Also implements themed color state lists to resolve TODOs in both time
and date pickers.

Bug: 19431361
Change-Id: I095fd8d653e02d9e5d20d66611432a08a7a5685e
2015-02-26 09:47:10 -08:00
Dianne Hackborn
ffeecb1bfb Rework voice interaction session lifecycle.
We now have a formal concept of the session being shown and
hidden, with it being able to continue running while hidden
as long as there is enough RAM.

This changes the flow that a VoiceInteractionSession will
see: onCreate() is when it is first created, onCreateContentView()
is when its UI first needs to be built, onShow() is called each
time it needs to be shown and has the arguments given when the
show request was made (which has been renamed from startSession to
showSession), and then onHide() will be called when the UI is
no longer shown.

The methods show() and hide() now allow a VoiceInteractionSession
subclass to control when it is shown and hidden, working with the
shown state being maintained by the system.

Change-Id: Ic4a430ec7e8bf76a5441fd0425e2932806170fcc
2015-02-25 17:36:17 -08:00
Filip Gruszczynski
924a18baa2 am cf8c112e: am 01dd0e86: Merge "Force translucency from windowIsTranslucent on SwipeDismissLayout." into lmp-mr1-modular-dev
* commit 'cf8c112ed87752d79a869de9426b5c5a950b5c43':
  Force translucency from windowIsTranslucent on SwipeDismissLayout.
2015-02-25 18:52:02 +00:00
Filip Gruszczynski
cf8c112ed8 am 01dd0e86: Merge "Force translucency from windowIsTranslucent on SwipeDismissLayout." into lmp-mr1-modular-dev
* commit '01dd0e86546a5bf815dd9a6e7cd4b7bf8e8f5719':
  Force translucency from windowIsTranslucent on SwipeDismissLayout.
2015-02-25 18:44:57 +00:00
Filip Gruszczynski
23958c6e2f Force translucency from windowIsTranslucent on SwipeDismissLayout.
Bug: 18799741

Change-Id: Ifb05869f1bf080d7555d7728dc085c41cc2c277c
2015-02-24 16:59:45 -08:00
Clara Bayarri
6f542f5a40 Merge "Floating toolbars: Encapsulate StandaloneActionMode view creation." 2015-02-23 17:49:47 +00:00
Jorim Jaggi
24bec7ce7a Implement nice transitions for light status bar
- When the flag changes, apply an animation from the current value
- When the flag change is caused by an app transition, synchronize
  the status bar animation with the app transition animation.
  PhoneWindowManager calculates the timings based on some heuristics
  of the app transition animations and supplies these timings to
  StatusBarService.

Bug: 19233606
Change-Id: I4f99afba8f1eebb3524699ed4d7fbafee5463a37
2015-02-23 13:08:41 +01:00
Yohei Yukawa
f487e0e395 Normalize deprecated 2-letter language code when necessary.
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
2015-02-21 02:26:40 +09:00
Yohei Yukawa
e55524ef04 Merge "Add tests for Ibb9eb9f65323795d139 and I6571d464a46453934f0" 2015-02-20 15:28:35 +00:00
Yohei Yukawa
e72d1c8274 Add tests for Ibb9eb9f65323795d139 and I6571d464a46453934f0
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
2015-02-20 23:41:36 +09:00
Clara Bayarri
7415d6667e Merge "Floating Toolbars: Wrap the ActionMode creation in DecorView" 2015-02-20 10:26:15 +00:00
Dianne Hackborn
5f83382c40 Merge "Add some detailed data as part of battery history." 2015-02-20 01:41:29 +00:00
Dianne Hackborn
d1eccbea38 Add some detailed data as part of battery history.
Every time the battery level changes, a new extended
detailed use data structure is written to the history.
This currently only contains delta CPU use since the
last detailed entry (total CPU and to three uids), but
it gives us the infrastructure for adding more detailed
data in the future.

A detail entry for regular history looks like:

     Details: cpu=15730u+2307s (u0a57=11312u+502s, 1000=2344u+701s, 0=473u+991s)
              /proc/stat=15377 usr, 1797 sys, 197 io, 0 irq, 8 sirq, 23103 idle (42.9% of 6m 44s 820ms)

u is user-space cpu time, s is system/kernel time.

The equivalent check-in output is:

9,h,0,Dcpu=15730:2307/10057:11312:502/1000:2344:701/0:473:991
9,h,0,Dpst=15377,1797,197,0,8,23103

Also add a new "unplug" command to the battery service,
to easily put it into a state where it always considers
the device to be running on battery.

Change-Id: Ic76d966f11e592b9dd671879977bf999ebc11eef
2015-02-19 17:37:12 -08:00
Clara Bayarri
399b51397b Floating toolbars: Encapsulate StandaloneActionMode view creation.
This CL defines a new interface to be used by ActionModeWrapper.
This allows each client to inject a different primary ActionMode to
the wrapper and keep view creation code next to ActionMode
creation.
The interface method is only called when the wrapper actually
knows that will be the used type, avoinding unnecessary view
creations.

Things pending after this CL:
- Correct handling of ActionModes created by
callback.onWindowStartingActionMode(). This includes all current usages
in an existing ActionBar, as it is handled by Activity. In the current
state, we do not intercept these ActionModes and hence cannot change the
representation.
- Representing the floating type
- Supporting two ActionModes in parallel in DecorView, one of each type

Change-Id: Ic38e209877c3876161d8dd56902e25b51fbe40b6
2015-02-19 22:42:20 +00:00
Clara Bayarri
ed2a54cfd3 Floating Toolbars: Wrap the ActionMode creation in DecorView
This change will allow us to create ActionMode representations on the
fly after onCreateActionMode by using the Decorator pattern. The new
ActionModeWrapper will be responsible for the creating the
appropriate ActionMode depending on the type chosen by the client,
and setting it up.

Things pending that are NOT addressed by this CL:
- ActionModes created by callback.onWindowStartingActionMode(). This
includes all current usages in an existing ActionBar, as it is
handled by Activity. This requires some additional refactoring.
- Representing the floating type
- Moving the view creation code specific to StandaloneActionMode
from DecorView to ActionModeWrapper, decoupling DecorView from
StandaloneActionMode completely
- Supporting two ActionModes in parallel in DecorView, one of each type

Change-Id: I1a8db711f53b771eac74f0e6496106acf1ca2727
2015-02-19 22:40:31 +00:00
Narayan Kamath
01b50bb06b am 907bcd96: am 644ebc88: am 0a7936b7: Merge "Fix a couple of issues with system_server forking."
* commit '907bcd96d7f54adaf3b3df6f476e09c636c646cf':
  Fix a couple of issues with system_server forking.
2015-02-19 20:27:11 +00:00
Narayan Kamath
907bcd96d7 am 644ebc88: am 0a7936b7: Merge "Fix a couple of issues with system_server forking."
* commit '644ebc8800ad5e2fa1c239bd65a2cf6a88e6556b':
  Fix a couple of issues with system_server forking.
2015-02-19 10:30:46 +00:00
Narayan Kamath
0a7936b7c5 Merge "Fix a couple of issues with system_server forking." 2015-02-19 10:17:32 +00:00
Piotr Jastrzebski
cc34625cb7 am 07aaff33: am 58524b2a: am e7e92381: Merge "Register DDM handlers at the beginning of main method."
* commit '07aaff33ef0e61dfbb15188c5aae0624dc9524a9':
  Register DDM handlers at the beginning of main method.
2015-02-16 13:06:08 +00:00
Piotr Jastrzebski
07aaff33ef am 58524b2a: am e7e92381: Merge "Register DDM handlers at the beginning of main method."
* commit '58524b2aa620ae1ea709ae48b8b8598548cc7202':
  Register DDM handlers at the beginning of main method.
2015-02-16 12:59:37 +00:00
Alan Viverette
91d415d863 Clear focus from previously focused view in EBT helper
Change-Id: I1bd70e345fb7e8a2a1a621c20912b8325a3cd142
2015-02-13 17:23:05 -08:00
Dianne Hackborn
ae6688b096 Update voice interaction layer for new UI design.
Can switch from a pure overlay at the top of the screen,
to interactive mode with the voice UI drawing at the bottom
and pushing its target activity up like an IME.

Add mechanism to get assist data to the voice interaction UI.

Add some basic visualization of the assist data, outlining
where on the screen we have text.

Add a test ACTION_ASSIST handler, which can propagate the
assist data it gets to the voice interaction session so
you can see what kind of data we are getting from different
apps.

Change-Id: I18312fe1601d7926d1fb96a817638d60f6263771
2015-02-13 11:27:57 -08:00
Narayan Kamath
b6b044ae82 Fix a couple of issues with system_server forking.
- Remove the obsolete --runtime-init arg. its prescence
  was preventing other arguments from being parsed.

- Be stricter about unparsed args - throw if we see arguments
  we don't expect. This was already implemented but broken
  (probably implemented by a crap programmer).

bug: 19378905
Change-Id: Id8b6158db7ef6368dd13ae61f591cdf2b278dfd1
2015-02-13 17:45:06 +00:00
Piotr Jastrzebski
da74a628f5 Register DDM handlers at the beginning of main method.
Compiler initializes RuntimeInit during compilation and stores an
initialized version of the class in oat file. Same thing happens to
DdmServer which handles DDM packets in JDWP thread started during JVM
creation. This means that after the creation of JVM all
DDM packets are handled by DdmServer.dispatch and since it's already
initialized during compilation it has all framework related handlers
already registered. If a packet arrives before AndroidRuntime.startReg
is called then framework native methods are not yet registered and the
processing of the packet fails with UnsatisfiedLinkError.

To fix this problem the registration of framework related DDM handlers
is moved to the beginning of ZygoteInit.main and RuntimeInit.main. This
means that the handlers won't be registered until main method is called
and that's guaranteed to be after AndroidRuntime.startReg is called. It
also guarantees that DDM packets will be properly handled as soon as
Java code is executed.

Bug: 18081539.
Change-Id: I9c674f53f3f62d58c46886e0b60698182e08f0c3
2015-02-13 13:32:25 +00:00
Narayan Kamath
f129af204c Merge "Move apache specific portions of android.net.http to external/apache-http." 2015-02-13 09:51:44 +00:00
Narayan Kamath
3bdd327f85 Move apache specific portions of android.net.http to external/apache-http.
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
2015-02-12 11:15:49 +00:00
Alan Viverette
77bb6f179a Stack alert dialog buttons when they are too long
Change-Id: Id1c0b8c0a8fd1c9949b15269fba52e88ef826e6b
2015-02-11 17:24:33 -08:00
Jorim Jaggi
b10e33ff80 Split up android.policy into framework.jar and services.jar 1/3
Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
2015-02-10 14:56:02 +01:00
Sander Alewijnse
8f6afec2aa Merge "Move the check for launcher managed profile support." 2015-02-09 10:17:57 +00:00
Dianne Hackborn
a7bb6fbeab First quick implementation of auto assist data.
Introduce new AssistData class that contains all data
the framework automatically generates for assist.  Currently
populated with a very simple tree structure representing
the app's view hierarchy.

Reworked how we populate the class name for accessibility
info, so this is provided through a new method call on View
that subclasses can override.  This method is also used
to populate the class name in AssistData.

Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
2015-02-06 10:42:44 -08:00
Alan Viverette
688ecaa7b9 am 00a1fa3e: am f15f6a50: Merge "Invalidate SubtitleView during setText()" into lmp-mr1-dev automerge: f1a4d0e
* commit '00a1fa3e433d333c58156ff4f1ede086b6ab0a09':
  Invalidate SubtitleView during setText()
2015-02-05 23:07:34 +00:00
Alan Viverette
00a1fa3e43 am f15f6a50: Merge "Invalidate SubtitleView during setText()" into lmp-mr1-dev
automerge: f1a4d0e

* commit 'f1a4d0e864f17c59c0e292e8f1161ab4397e5ba4':
  Invalidate SubtitleView during setText()
2015-02-05 23:00:44 +00:00
Adrian Roos
5bb7255454 Merge "Ensure new credentails are valid" 2015-02-05 18:44:15 +00:00