There is a bug in how we deal with name overflows combined with resetting
the battery stats data. If we do a reset while a wakelock is being
actively held that has been put into the overflow bucket, then we can
end up reducing the number of known wake locks in the list so when after
that it is released we try to release it under its real name rather than
the overflow name.
This means we need to keep track of which wake locks have been placed
in the overflow bucket while they are actively being used, so we can be
sure to properly handle it as part of that bucket until it is eventually
released.
This makes things... somewhat more complicated. So now we have a class
to take care of all these details, and also use it for other places where
we have the same overflow semantics sync and job stats.
Also fix potential deadlock -- BatteryStatsHelper needs to call on to
ConnectivityManager to find out of there is telepohny, however we use
that class when doing a dump while the battery stats lock is held. To
fix this, we check the connectivity state up in the battery stats service
before acquiring the lock and propagate that information through to the
dump code.
Change-Id: Ib452206af5c36f4b0f03cc94d2845d36613d1ba5
It was being given the argument and just... ignoring it.
But the bulk of this change is to make replacePreferredActivity
better about replacing -- it now detects if the request will not
make a change and, in that case, just do nothing.
The reason for this?
It turns out that each time you install an app, the telephony
system is calling this function over 20 times to set the default
SMS app. This is almost always doing nothing, but before this
change it means we would re-write packages.xml over 20 times...!
There are definitely more improvements that can be made here (delaying
write of packages.xml to allow them to batch together, reducing
the amount of calls being made), but until then this is a big
improvement.
Change-Id: I02c4235b8ecd5c13ef53e65d13c7dc2223719cec
Changing from UserHandle.getCallingUserId() to UserHandle.myUserId().
This makes the DocumentProvider work across users.
BUG: 16126891
Change-Id: I8ede64f2087894bb85eff5286803cdebd57e7137
With this change, mobile devices state changes are propagated through
TIF to UI, hence the input pickers shows the mobile devices as
expected.
Bug: 16986744
Change-Id: Id633207acf4f814f57d43cc1de5f8cb88ac23ad6
Adds support for a String[] return type in ViewDebug; and in addition to that,
the hasAdjacentMapping method can use the String array as means to map a key to
its value.
Adds DEBUG_VIEW_ATTRIBUTES to Settings so that the heavy per-view
computations only affect those who opt in. This setting is used in
CoreSettingsObserver to avoid impacting start time.
Change-Id: I8f507e4e5361414c30d247e8d9815205feb5e91f
...with grantUriPermissions (no user interaction required)
Add a new path in to the activity manager to start an activity as
if it was directy started by the original calling activity. This
is specifically for the resolver activity and chooser activity to
be able to safely launch its data after serving as an intermediary.
Access to the new method is highly restricted -- it can only be
called by an activity that is declared in the framework apk itself,
and the execute-as-the-caller behavior will only happen if the
code is running under the system uid. (This means we could still
have these run in the client's process in some cases and still work
correctly.)
Note there is some commented out code here half-done about trying
to propagate security exceptions back to the original calling
activity. This would be really nice, especially now with the
chooser activity running in a system process so any errors made
by the app (bad permission grants, bad intents, etc) no longer
actually appear in the app so are essentially invisible. I'd
really like to figure out a way to propagate these exceptions back
to the app, but this is hard since the app's process may no
longer even be running at this point.
Also tweak activity manager dump output to split the recents
dump out from activities, since recents can now be super large.
Change-Id: I50410c4783faf9302c69290589a068a846e0973a
We are now using the application info of the target app
of the remote views to create a deicated context for
loading resources. The code that is looking up the app
info was using the appilcation context of the current
app which may be null. Now we are using the base context
which is never null.
bug:17005860
Change-Id: Ibcf8b6f81fe24d23a82327870741146c8864ce8f
Add a simple internal wrapper for dealing with window callback events.
This should also make working with things like action modes from
ToolbarActionBar significantly easier in later changes.
Bug 16980711
Change-Id: I2c3d7525489a21847f4af9b80f6ebf9b34b4dd58
If EMS is not supported, framework breaks down EMS into single segment
SMS and adds page info " x/y".
In the case of UCS2 encoding type, we need 8 bytes for this, but we
only have 6 bytes from UDH, so truncate the limit for each segment by
2 bytes (1 char).
Change-Id: Ieadb8d27d1cdf2f1e5322ec16c5a62d55e26bdfd
Move location selection logic into shared PackageHelper location,
and share it between DCS and PackageInstaller. Fix bugs related to
installed footprint calculation; always count unpacked native libs.
Have PMS do its own threshold checking, since it's fine to stat
devices. PMS only ever deleted staging ASECs, so move that logic
into installer and nuke unclaimed staging ASECs. Allocate legacy
ASEC names using PackageInstaller to make sure they don't conflict
with sessions.
Start wiring up session to allocate ASEC and pass through staged
container for installation.
Fix bug to actually delete invalid cluster-style installs.
Bug: 16514385
Change-Id: I325e0c4422fc128398c921ba45fd73ecf05fc2a9
We weren't taking care of the case of an upgrade to L. The main
change here is that the voice interaction service setting now has
an empty string when the user has explicitly said they don't want
one, so when it is null we will initialize it to its default.
Change-Id: Icdd30b4f09498f8928cea759a64628bd43bc5d0e
Instrumented the basic power manager state transitions,
calling into the Power HAL, setting the display power mode,
and setting the backlight.
Bug: 17004602
Change-Id: I4e362162ddfd7292a7eea8b5d029ce3f6593c4a9
Removes done buttons from widgets, fixes date picker day selection, fixes
dialog layouts in landscape, updates colors. Adds API on AlertDialog for
setting the view by resource ID, which is necessary to correctly inflate
the view against the dialog's parent view.
BUG: 16941550
BUG: 16852521
BUG: 16878697
BUG: 16838659
BUG: 17047435
Change-Id: I138858ce06cd4abf68a2c3361ec170370236b33b