Since these alarms allow you to bypass the idle restrictions,
we don't want them to be so open-ended like other alarms. This
implements a policy where the alarm manager will only deliver these
types of alarms every X minutes to each application. For this
initial implementation, X is 1 minute under normal operation and
15 minutes when in idle mode.
To do this, I needed to introduce a new internal allow-while-idle
flag for system alarms, which applications can't get, and doesn't
have these new restrictions.
Also tweaked how the alarm manager handles the alarm window, so it
doesn't change if the alarm gets rescheduld; the window is now always
what as computed based on the time when the alarm was first
given to it.
Finally, fix TimeUtils to be able to correctly print times that
are > 999 days.
Change-Id: Ibad8c6a7c14b0624b54e82267be23224b4c31e84
Docs for translucent-vs-transparent-vs-opaque were confusing, especially since
the definition for those constants in PixelFormat are not the same as how they're
actually used in Drawable. This fix simply adds clarifying text to the method
comment for getOpacity().
Issue #21158891 Better document Drawable#getOpacity
Change-Id: I94725592f85e5d7874e3a3ac1c5bab969163fbf0
Also reduce idle checks to the target user if possible.
Optimized calls to some internal methods
Bug: 21639147
Change-Id: If1faf26f862e5c4ca905f2603a4ba52a8d1af954
- Switch AlphaOptimizedImageView to have the boolean hasOverLappingRendering()
return be a custom value. This allows us to have AnimatedImageView extend
AlphaOptimizedImageView and support both types of ImageViews w/o having to
create 2x subclasses.
- Add drawable ID tracking to AnimatedImageView so that we don't interrupt
animations with an update of the exact same drawable.
- Switch mobile signal icon to use AnimatedImageView so that animations aren't
interrupted.
Bug: 21504588
Change-Id: Ic2275f1bf607449c191ae0d08bc7756c7d694bc1
This method was added earlier in M - removing it now based on API
Council feedback.
Issue #21572678 API Review: android.view.View.getBackgroundColor()
Change-Id: I04fad49c3c377218d0fb708dbeaea609aca46ce8
The floating toolbar now has it's own theming:
* material_light used for all light themes
* material_dark for dark themes
The attributes are not public.
Bug: 21177954
Change-Id: I7ccf9c677be44d510ab48168c0215d37456be059
The fact that currently apk signature is certificates is just
implementation details.
Bug: 20820366
Change-Id: Icdd02cb51a550ea71ff83a84e2bdfcc21f8d43ed
ext4 filenames are at most 255 bytes. vfat filenames are bit more
lax, but we're often saving them on ext4 through a FUSE daemon, so
limit them the same way.
Since package names are used as directory names, verify that they're
valid filenames.
Tests to verify behavior.
Bug: 18689171
Change-Id: If7df4c40d352954510b71de4ff05d78259c721ed
This allows for the thresholds to be tuned differently for different
products as needed.
Bug: 18276856
Change-Id: I6c87e683dea6a17cf606203a894c8419e20d3658