There was a mistake in the code that was supposed to recover from the
initial time on a new device being bad until the real time ultimately
gets set, which was causing us to update the start clock time every time
there was a time change (instead of just when the original start time
appears bad).
Rework all of this, so we now count the start time as bad if it is more
than one year before the current time, only modifying it in that case.
Also when modifying it, adjust the time we set it to take in to account
how much realtime has actually elapsed so far in the battery stats.
Change-Id: If74bd711d9b7618c8f6148a9935c452aaaa7e257
We weren't correctly handling the root view of the window --
we were just pushing it on to the stack, but that means it got
written at the end. Instead, we now immediately write it
after the window and let things follow from there.
Change-Id: I070c96bd2443f312a7c6f495d1bf72fa19c614d6
Not sure how useful this is, since renames should be atomic. If the filesystem
is corrupt I'm sure other parts of the system will break. Good to be safe though!
Bug:22172659
Change-Id: Iad339be2869d170bcf736c59feb93830a51905e1
Outsets are used during measure/layout pass, but this can be called on a
view that is not currently attached.
This is a cherry pick that somehow didn't get through to master.
Bug: 21602590
Change-Id: I23e3acc45ca4bf7684d8913f839e29e8e9e94d78
Bug: 22558805
Change a039182d6157bc0487df4ad8e373685c9dd7d662 reduced
the size of an entry from 4 fields to 3, but failed to
update the constant that determined the size of the java long[].
Because the long[] is blindly passed down through to native, this
will result in reading past the end of the array as the size
is no longer a multiple of the number of fields being read so
the loop will not terminate until 1 iteration past the end.
Change-Id: I2f8e26cec9a60b3a74739a3763203296be5f1fd6
As discussed in b/21429947 (commit
674019065bceb4150190bfb1aa63cda9de0a8560), MTP must always be
enabled, even if access to the underlying MTP data is disabled.
Otherwise, Android will not enumerate on the USB bus, and won't
receive notifications from the kernel about USB state changes. This
effectively prevents using MTP functionality on user builds, or
on userdebug/eng builds with adb turned off.
Always ensure that MTP is the default driver mode.
Get rid of one use of the persistent property. The persistent property
was already pulled from a number of devices, and as explained in
commit fcf10f7c12cb3107bdfedce6f76a8c866d154f3c, the intent was that
the persistent property would only hold the persistent adb state.
Bug: 22447614
Bug: 21429947
Change-Id: I8b3690a1bafb7cea0d5a69d73c1065c7fc64c653
When waiting for all the windows that belong to an activity, we
skipped the main window, in case it didn't had a surface yet. This
was a problem because with SurfaceViews: They set it's visibility
extremely early in the app visibility change cycle. Then, they don't
block with the callback to SurfaceHolder.Callback2.surfaceRedrawNeeded,
so window manager thinks it has drawn the first frame already. We don't
even have a surface for the main window yet, but we start the app
transition already because we think the only interesting window for this
app token is the SurfaceView, which has supposedly already drawn.
Bug: 22207948
Change-Id: I2ddb274000fa08866e193f4fd8db3788fc55e0f1
Long clicking on settings gear in QS causes it to accelarate and
spin, when released it will open and enable the tuner. On first
opening there will be a warning dialog.
Also add way to disable tuner from tuner screen. This way it can
be removed from its former home in Developer Settings. All tuner
settings are reset when disabled to match developer settings
behavior.
Bug: 22462605
Change-Id: Ie700a6a15e6c3caccf7cd1885da73328e6fac6ab