Alexis Moussine-Pouchkine: Hi, everyone.
We're here at Devoxx 2014, and I'm here where Chet and Romain.
Chet, Romain.
Romain, Chet.
ROMAIN GUY: It's all the same.
NICK BUTCHER: Yeah.
It's all the same.
You don't even know who's who.
We're here to talk about Android 5.
That you know what it is?
CHET HAASE: Yes.
Yes.
NICK BUTCHER: L stands for?
CHET HAASE: Lollipop.
NICK BUTCHER: Lollipop.
Awesome.
And people are actually, as we speak,
getting their updates over there.
So what are they actually getting?
I hear things like material design, material design,
and material design.
CHET HAASE: That's pretty much it.
Those are the first three elements,
and then there's a couple after that, including material
design, and then also the implementation
of material design.
ROMAIN GUY: There are a few more features.
CHET HAASE: Are there?
ROMAIN GUY: Yeah.
CHET HAASE: OK.
That's certainly the ones that I worried about.
So basically everything that the team that I'm on,
which is the UI Toolkit Team, worked on for the release
was all about material design.
Because the UX Team's vision for material design
was so grandiose and large, basically we
needed to work the entire [INAUDIBLE]
to figure out how to implement that thing.
NICK BUTCHER: So you worked really hard
so developers don't have to?
CHET HAASE: That's another way of putting it.
Sure.
NICK BUTCHER: So what are developers getting, really,
with material design?
So there are things like coloring,
there are things like, obviously, animations,
and all of that is baked in the platform at this point.
CHET HAASE: Right.
Right.
So I think one of the things to come out of this,
like, if you go to these talks and you sort of read
the articles, you're like, well, so what's
this huge new swath of APIs that I
need to use to implement material design in my app?
And the answer is actually not that much.
A lot of it just comes for free.
So when you opt into the material theme
or if you're using the support library,
you opt into the AppCompat theme,
and then you're running on the Lollipop release,
you're just going to get a bunch of stuff
for free, which is the colorizing of the assets.
So you're going to look like the standard, which
it should look on the platform.
You're going to get animations in a lot of areas,
icon animations.
You're going to get shadows and elevation on standard widgets.
So all of that stuff is for free.
Then you can choose to opt into more material design
capabilities, like custom animations or activity
transitions if you want to.
But you don't have to do all of that stuff.
It's sort of a sliding scale of how far do you want to go.
NICK BUTCHER: OK.
So that's obviously a big piece, material design.
And users will see it.
Developers need to understand what
it is that people will certainly expect to see, too.
ROMAIN GUY: Developers should definitely
go read the guidelines, because there's
a lot to learn about what's expected
in terms of animation--
NICK BUTCHER: So that was a conversation
we had previously was is this something for just designers
or should developers really read this?
ROMAIN GUY: Well, yeah.
It's for developers, but designers
should understand it as well.
NICK BUTCHER: And vocabulary is probably something important
so everybody's on the same page for that.
Beyond material design, there must be a few other things.
So Notifications is one of the first things that users see.
How does that surface in the API to developers?
ROMAIN GUY: Well, there's the new future
of adding the Notifications on the Lock screen
so the users can choose what they
want to expose on their Lock screen,
because there's obviously a privacy concern.
So applications can tell the system
if the Notifications should be Public, Private, or Secret.
And then the user can decide if they
want to make private notifications public
or if they want to keep everything private.
So there's a lot around that.
CHET HAASE: There's new APIs around colorizing your assets.
So further branding of your application
by coloring your Notification icons.
Sort of minor tweaks on top of what Notification's already
doing.
NICK BUTCHER: Right.
But for the most part, we're sticking.
And any use of the existing Notification API
will just transfer?
CHET HAASE: That just works.
ROMAIN GUY: Yeah.
Everything that used to work still works.
It looks better.
NICK BUTCHER: It looks better.
That sounds pretty good.
Concurrent documents.
So one of the things people will see
is that when they look at all their applications,
every Chrome page is rendered as a separate document.
So is that something that's available to developers
as well?
ROMAIN GUY: Yeah.
There's a new API.
Applications can decide what is a document.
And they have a lot of control over when
do they start a new document, how many documents
do they want to keep in that list.
And for certain applications, like Docs or Chrome,
it makes a lot of sense.
It's not going to make as much sense for other things,
like a media player, a music player,
but it's up to the developers.
NICK BUTCHER: So one thing I saw in the release
notes is the ability to have now a Chromium-based WebView, which
was one of the new things in KitKat.
To have some sort of a modern WebView
with a number of new features.
It is now being unbundled in the sense that it's there,
but it's being updated outside of the main releases.
CHET HAASE: Yeah, from the Play Store.
NICK BUTCHER: From the Play Store directly.
CHET HAASE: Right.
So now the WebView has the ability
to be updated from the Play Store
so you can actually get more recent updates to WebView
outside of the standard platform releases at whatever time
schedule they're at.
NICK BUTCHER: Which means whenever Chromium
has this new release with support for, I don't know,
WebGL or what have you, you can get it fairly quickly?
ROMAIN GUY: Well, and more importantly for bug
fixes for instance.
NICK BUTCHER: Oh, and that, of course.
CHET HAASE: Right.
Yeah, I don't know what the specific plans are, like,
how frequently they would release it.
The announcement was more around the plumbing and the capability
to actually do the unbundled releases
through the Play Store for now.
NICK BUTCHER: Great.
So any other APIs?
I'll get to runtime implementation.
ROMAIN GUY: Many APIs.
NICK BUTCHER: Yeah.
I heard 5,000.
It scared be a little bit, but we certainly
don't have time to cover the 4,900 other ones.
Any ones that you want to cover?
ROMAIN GUY: Let's see.
I mean, I can talk about APIs that I like personally.
The ability to run your PS1, since I think it
can be very useful to a lot of applications.
Obviously not all of them.
I also like the unification of all the media session
APIs to be able to control music playback.
Now there's a unified way of creating a playback
UI in Notifications, because now every media player
has its own way of doing it.
It can be a little confusing for the users,
but now there's a common style.
And since applications can brand their notifications,
it will still look like your media application.
It's just easier for everybody.
NICK BUTCHER: So something else you're probably interested in
is updates to OpenGL support?
So what's new there?
Is that just a new rev of OpenGL?
ROMAIN GUY: Android 5 is getting OpenGL 3.1, which
brings a lot of very interesting features
to graphics programmers and game developers.
And also there's the introduction
of something called the Android Extension Pack.
So it basically gathers 20 existing OpenGL Engine
extensions and packages as a single one
so developers are guaranteed that all of these extensions
will exist on all Android 5 devices.
It's easier to manage them that way.
NICK BUTCHER: So all of that, by the way,
is now powered by a new runtime.
So ART is now the new and only runtime,
and so there's no going back to Dalvik, right?
ROMAIN GUY: There's no going back.
CHET HAASE: Over their dead body,
I think they would probably say.
Yeah, so ART is a better runtime,
and it's the only one there.
It allows ahead of time compilation.
It allows better, much faster, and smaller pause time GC.
So allocation of objects as well with collection objects
is much faster.
It also has the ability to defragment the heap
by actually being a moving collector.
So when your activity goes in the background,
then that might be an appropriate time
for it to actually gather the objects together,
sort of to create larger spaces in the heap, which was not
possible under Dalvik before.
NICK BUTCHER: So does that actually help you reach, like,
those 60 frames per second at all?
Was that a big--
CHET HAASE: Yeah.
Yeah.
Because the more garbage you allocate, the more objects
you allocate.
Over time then, the garbage collectors are going to come in
and say, well, I need more memory.
I can't find memory immediately so I'm
going to have to collect dead references to actually create
the room to allocate more objects.
And that took more and more time.
The more fragmented your heap would get,
the messier things got.
So then you'd see pause times.
If you'd just run logcat, then you
would see pause times of easily 10 to 20 milliseconds
when it would do a full stop-the-world GC.
And now those pause times are down
to, like, two or three milliseconds
at a time, which means it brings it
below that magical barrier of 16 milliseconds.
16 milliseconds is the amount of time
that you have to do everything to do
to put the pixels onto the screen
in order to maintain 60 frames a second,
say for animations or other rendering stuff.
So if we can get the pause time down to such a point where it's
less significant or not huger than a single frame
just in and of itself, then we've
got a much better chance of maintaining a smooth frame
rate.
NICK BUTCHER: So if people are interested
in the actual implementations of the GC,
I would recommend they watch the Google I/O sessions
that go into very much detail--
CHET HAASE: As well as the Android Developers Backstage
Podcast.
We had a two-parter, because I was so into the runtime
that we talked to Anwar for much longer
than we were supposed to.
NICK BUTCHER: I listened to both parts, actually.
CHET HAASE: OK.
NICK BUTCHER: So it was interesting enough
for me to go until the end of the second part
so I do encourage people to listen to that one as well.
So let's see, Project Volta battery usage.
Is that just an internal thing.
So we gather statistics and we learn from it
then you guys can do stuff?
Or is it something exposed to developers as well?
ROMAIN GUY: Well, it's similar to what we did before
with Project Butter and Project Svelte, which
was an internal project gathering a lot of statistics
to understand what was going on in the system,
obviously fixing the problems as they were identified,
and then making available the tools that were built
for internal use to all developers.
So there is something called the Battery Historian,
it's on github.com/google, and it's the tool that was used
by the Android Team to find all those issues.
CHET HAASE: It's actually similar to a lot of the tools
that we've seen on Android.
Some of them look, you know, a bit homegrown,
and it's because they were, right?
So the GPU profiler stuff, especially the
on device tools as well as some of the DDMS tools,
you actually wrote because you needed them
to [INAUDIBLE] the platform in one way or another.
Like, I personally would benefit from having
a tool that showed me this information.
So you write the tool, and then there's
no reason not to push the tool out there for other people
to benefit from as well.
NICK BUTCHER: OK.
Anything else you want to mention on maybe,
I don't know, your favorite feature?
I know it's like choosing--
ROMAIN GUY: I mean, Android 5 is a huge release,
and I think everybody should just go take a look at it.
There's [INAUDIBLE], you can run the emulator,
the system images from each of the devices are available,
look at the release notes.
I mean, there's something for everybody.
NICK BUTCHER: Right.
And we didn't talk about the devices,
but there is certainly some new shiny devices to look at.
A phone, a tablet, and certainly that
is a good way to first experience as a user,
and probably as a developer they're
really cool and powerful devices.
Anything else?
CHET HAASE: Animations.
Lots of new animations.
That's always a good thing, right?
ROMAIN GUY: That's all you care about.
CHET HAASE: Yeah.
Well, it's-- sure.
Yeah.
OK.
NICK BUTCHER: Great.
Well, I guess that's all the time we have for it.
Thanks, guys.
ROMAIN GUY: Thanks.
CHET HAASE: Thanks.
NICK BUTCHER: See you soon.
Bye, everyone.