• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/com/android/server/
History log of /frameworks/base/core/java/com/android/server/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e37030505ee3d461508611e1a291aff7b9e82a43 09-Dec-2014 Patrick Tjin <pattjin@google.com> Add recovery kmsg to dropbox

Bug: 18642766

Change-Id: I10e4532904a3a8cac43bec7630b9a7a90c2424ba
Signed-off-by: Patrick Tjin <pattjin@google.com>
ootReceiver.java
18795a2299fefd88ee16393f22324b999ace6ce4 03-Dec-2014 Wale Ogunwale <ogunwale@google.com> Add support from restoring recent's backup.

Bug: 15986349
Change-Id: I899f81d317fcd5277a75db7ba50ecca14112df26
ackup/SystemBackupAgent.java
ac6a3a5e9d90edb533e5b377a4a14ef514be955a 18-Nov-2014 Christopher Tate <ctate@google.com> Recents backup helper

Handles backup/restore of recent tasks for the system. Currently the
thumbnails are not saved.

At restore time the historical task records are placed in a designated
separate location rather than directly in the live bookkeeping; this
avoids ID duplication issues and makes it easier to deal with lazy
adoption of the historical task state as apps are installed on the
device post-restore.

Bug 17303286
Bug 15986349

Change-Id: Ie156c1e2ab9c9a7e7ac0447b27016fdcef55dded
ackup/SystemBackupAgent.java
dea847c2ace8894a595cf9bd87764ce2ca9698ab 01-Oct-2014 Patrick Tjin <pattjin@google.com> Skip over directories when iterating tombstones

Bug: 17380601
Change-Id: Idb6e559a89c7438751bd7a52375b9789454e0334
ootReceiver.java
91317107a39a4f2a9347105b96aafcb98fe21fee 11-Sep-2014 Paul Lawrence <paullawrence@google.com> Create correct files in dropbox on encrypted boot

On the minimal framework start, don't mark ro.runtime.firstboot, allowing
the real framework to properly create the dropbox files in the real /data

Bug: 17450632
Change-Id: Ic53b3471b44e69f3eea7e3f3de18e789f51192bc
ootReceiver.java
8def5cbb3a1a68bb66fbe7ce63fcc8eadcbb238d 22-Aug-2014 Brian Carlstrom <bdc@google.com> Move SystemBackupAgent from services.jar to frameworks.jar

Bug: 17168017
Change-Id: I89b98ca839a78eeb7fb43930e0699ee235deafad
ackup/SystemBackupAgent.java
29564cd24589867f653cd22cabbaac6493cfc530 07-Aug-2014 Narayan Kamath <narayan@google.com> Remove system_server classes from the boot image.

We set the system_server classpath in the environment
(like we do with BOOTCLASSPATH). After the zygote forks
the system_server, we dexopt the classpath (if needed)
and then launch the system server with the correct
PathClassLoader. This needed several small / medium
refactorings :

- The logic for connecting to installd is now in a separate
class and belongs in the system_server.
- SystemService / SystemServiceManager have now moved to
classes.jar. They are only used from there, and since they
use Class.forName, we want them to be loaded by the
system_server classloader, and not the bootclassloader.
- BootReceiver now moves to frameworks.jar, because it is
used by ActivityThread and friends.

bug: 16555230

Change-Id: Ic84f0b2baf611eeedff6d123cb7191bb0259e600
ootReceiver.java
ystemService.java
ystemServiceManager.java
6d2a9492e2b19421165f0cd918d9f28595bfb770 08-Aug-2014 Jeff Brown <jeffbrown@google.com> Eliminate power manager latency for boot completed.

The power manager disables the power button until boot completed
occurs. If there are many pending broadcasts in the queue, it
may be possible for BOOT_COMPLETED to be delayed for several
seconds after boot.

To avoid the delay, introduced a new boot phase which is
sent to system services immediately when boot completed happens.

Bug: 13398280
Change-Id: I1833d2ffb20305009dd76363b43e534034f1d0a2
ystemService.java
20ceb903731bc732eb063b1bbee3bac806a5d5ef 17-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Disable logging in NetlinkTracker.

This logging can get quite spammy in GoogleGuest, and there's
currently no reason to think it's necessary. Much of the same
information is available via "adb shell ndc monitor".

Bug: 16328180
Change-Id: I15a8348e261d6b69a4ef8bdaf8a2a431b1c2bc0d
et/NetlinkTracker.java
93e6d9db7848a6efe823def6f480c8f4ea74ba85 23-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Initial RDNSS tracking implementation.

Add a DnsServerRepository to NetlinkTracker that keeps track of
IPv6 DNS servers received via RDNSS. It supports expiring
existing DNS servers when their lifetimes go below zero and
keeping track of more than just the 2 or 3 DNS servers that are
currently in use, so that if they all expire DNS will continue to
work.

It does not yet expire DNS servers using timers, only when a new
update comes in.

Bug: 9180552
Change-Id: I455699076198f43570a3b0b8ec7e5967514d6086
et/NetlinkTracker.java
2c43c339de5aaf4fef58aa9b5ac3af48609263a8 13-Jun-2014 Jeff Brown <jeffbrown@google.com> Resolve boot time dependencies related to the power manager.

This change fixes a bug where native daemons may try to communicate
with the power manager before it was fully initialized due to a race
between publishing the binder service and completing init().

The solution was to simplify the dependencies related to the power
manager. It turns out that most services that were passed in
init are not actually needed until systemReady. What remained
was a dependency on the activity manager to check permissions for
incoming calls. So now we start activity manager first.
However, the activity manager also depends on power manager for
wakelocks. To break the cycle, we now defer initializing the activity
manager's wakelocks until after the power manager has been started.

Cleaned up a bunch of boot-time service dependencies so that we
can have better confidence that they are correctly maintained.

Bug: 13884219
Change-Id: If08e2d7ccd44e7026a72441bb6bd5afd7bb9fffe
ystemServiceManager.java
c18cbfdf8d40e7a526a088225cb32341e1ea0920 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Notify network observers of route changes.

Bug: 9180552
Change-Id: If8432bc74335676320b815784b21f404d3479c35
et/BaseNetworkObserver.java
et/NetlinkTracker.java
10accbb46e82b3178ff26124041f3ab7d6c1802d 04-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Move netlink updates to a new NetlinkTracker class.

This will allow us to use this logic on other link types such as
Ethernet, and will also avoid increasing the complexity of
WifiStateMachine as we get more information such as routes and
DNS servers from netlink.

Bug: 9180552
Change-Id: I79034827cb0c5f24d783d7243e04b69e12aa3cc6
et/NetlinkTracker.java
e2708d98ce9d05fe798f93d1c1188fe15009bdc3 10-Jun-2014 Jeff Brown <jeffbrown@google.com> Delete stale commented out declarations.

Most of these methods have now been implememented earlier
in the class.

Change-Id: Id9ef2fa09c64ada788f1b9d95b14836f98498843
ystemService.java
91097de49b0f683b00e26a75dbc0ac6082344137 05-Apr-2014 Dianne Hackborn <hackbod@google.com> Initial implementation of new voice interaction API.

This gives a basic working implementation of a persist
running service that can start a voice interaction when
it wants, with the target activity(s) able to go through
the protocol to interact with it. It may even work when
the screen is off by putting the activity manager in the
correct state to act like the screen is on.

Includes a sample app that is a voice interation service
and also has an activity it can launch.

Now that I have this initial implementation, I think I
want to rework some aspects of the API.

Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
ystemService.java
ystemServiceManager.java
adfe8b86e9178a553b6db9722340fa4ff5201cf1 05-Feb-2014 Christopher Tate <ctate@google.com> App widget backup/restore infrastructure

Backup/restore now supports app widgets.

An application involved with app widgets, either hosting or publishing,
now has associated data in its backup dataset related to the state of
widget instantiation on the ancestral device. That data is processed
by the OS during restore so that the matching widget instances can be
"automatically" regenerated.

To take advantage of this facility, widget-using apps need to do two
things: first, implement a backup agent and store whatever widget
state they need to properly deal with them post-restore (e.g. the
widget instance size & location, for a host); and second, implement
handlers for new AppWidgetManager broadcasts that describe how to
translate ancestral-dataset widget id numbers to the post-restore
world. Note that a host or provider doesn't technically need to
store *any* data on its own via its agent; it just needs to opt in
to the backup/restore process by publishing an agent. The OS will
then store a small amount of data on behalf of each widget-savvy
app within the backup dataset, and act on that data at restore time.

The broadcasts are AppWidgetManager.ACTION_APPWIDGET_RESTORED and
ACTION_APPWIDGET_HOST_RESTORED, and have three associated extras:

EXTRA_APPWIDGET_OLD_IDS
EXTRA_APPWIDGET_IDS
EXTRA_HOST_ID [for the host-side broadcast]

The first two are same-sized arrays of integer widget IDs. The
_OLD_IDS values are the widget IDs as known to the ancestral device.
The _IDS array holds the corresponding widget IDs in the new post-
restore environment. The app should simply update the stored
widget IDs in its bookkeeping to the new values, and things are
off and running. The HOST_ID extra, as one might expect, is the
app-defined host ID value of the particular host instance which
has just been restored.

The broadcasts are sent following the conclusion of the overall
restore pass. This is because the restore might have occurred in a
tightly restricted lifecycle environment without content providers
or the package's custom Application class. The _RESTORED broadcast,
however, is always delivered into a normal application environment,
so that the app can use its content provider etc as expected.

*All* widget instances that were processed over the course of the
system restore are indicated in the _RESTORED broadcast, even if
the backing provider or host is not yet installed. The widget
participant is responsible for understanding that these are
promises that might be fulfilled later rather than necessarily
reflecting the immediate presentable widget state. (Remember
that following a cloud restore, apps may be installed piecemeal
over a lengthy period of time.) Telling the hosts up front
about all intended widget instances allows them to show placeholder
UI or similarly useful information rather than surprising the user
with piecemeal unexpected appearances.

The AppWidgetProvider helper class has been updated to add a new
callback, onRestored(...), invoked when the _RESTORED broadcast
is received. The call to onRestored() is immediately followed by
an invocation of onUpdate() for the affected widgets because
they will need to have their RemoteViews regenerated under the
new ID values.

Bug 10622506
Bug 10707117

Change-Id: Ie0007cdf809600b880d91989c00c3c3b8a4f988b
ppWidgetBackupBridge.java
idgetBackupProvider.java
0535a9f7aa5d0f875b06845e9af5f6dbfc5c8a19 13-Mar-2014 Ashish Sharma <ashishsharma@google.com> Include elapsed realtime (nanos) of the event in the radio state change notifications.

Bug: 13247811
Change-Id: I3454aa159a68b9087b4762df947b41965b5a3941
et/BaseNetworkObserver.java
2cb6c60c0d2de3bc743c043aca963db6fe52662f 15-Feb-2014 Adam Lesinski <adamlesinski@google.com> Make UsbService optional

Tweaked the services Android.mk to build dependencies
when building with mm[m].

Change-Id: I6dad511c652bcacc085f27ede5f8f22a6982c6bd
ystemService.java
ystemServiceManager.java
3048191b4cf9eff7a72b84065dec2b3dd1e89b3c 14-Feb-2014 Jeff Brown <jeffbrown@google.com> Remove onCreate() method that should not be there.

Change-Id: I8355dd78f910afa9895d2fa00cb627a0885d9eec
ystemService.java
b880d880c6cd989eacc28c365fc9a41d31900da1 11-Feb-2014 Jeff Brown <jeffbrown@google.com> Make SystemService constructor take a Context.

This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor. It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.

Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
ystemService.java
ystemServiceManager.java
4ccb823a9f62e57f9d221f83a97e82967e79a9e5 17-Jan-2014 Jeff Brown <jeffbrown@google.com> Refactor display manager service to new pattern.

Transform DisplayManagerService into a SystemService and start cleaning
up other local services that it uses from window manager and input manager.

Clean up service thread initialization.

Remove unnecessary static variables from ActivityManagerService.

It's starting to become clear that we really need a better way to manage
service dependencies. Boot phases don't quite cut it.

Change-Id: If319dbd7cbfbd4812fe55ece969e818d4b20755b
ystemService.java
6f357d3284a833cc50a990e14b39f389b8972254 16-Jan-2014 Jeff Brown <jeffbrown@google.com> Start untangling system server early bootstrapping.

Refactored SystemServer to get rid of a bunch of legacy cruft related
to how the ServerThread used to be started up.

Create system context first when system server starts. This removes
the tangled initialization order dependency that forced us to start
the activity manager service before most anything else.

Moved factory test related constants into the FactoryTest class.

Partially migrated Installer, ActivityManagerService, and
PowerManagerService to the new SystemService pattern. There's more
work to be done here, particularly around the lifecycle of the
power manager.

Bug: 12172368
Change-Id: Ia527dd56e3b3fd90f9eeb41289dbe044921230d4
ystemServiceManager.java
b102b2cc73baa20e8cc9e4c081235b031c4e8fe0 20-Dec-2013 Adam Lesinski <adamlesinski@google.com> Move SystemService code to frameworks/base/core

Paves the way for building services without needing to see the
rest of frameworks/base/services.

Change-Id: I8ac4bc9d25471e96076cd888c1fc24b918d8911f
ocalServices.java
ystemService.java
ystemServiceManager.java
64483947fdb03bf838e317ac0a4af5e0f53a5bbf 15-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Add address flags and scope to LinkAddress.

This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
Since most callers don't know about flags and scope, provide
constructors that default the flags to zero and determine the
scope from the address. Addresses notified by the kernel will
have these properly set. Make multicast addresses invalid.
Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
address and prefix information between two LinkAddress
objects. This is necessary because an interface can't have
two addresses with the same address/prefix but different
flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
to identify existing addresses to add/remove using
isSameAddressAs instead of implicit equals(). Specifically:
- If addLinkAddress is called with an address that is already
present, the existing address's flags and scope are updated.
This allows, for example, an address on an interface to go
from preferred to deprecated when it expires, without it
having to be removed and re-added.
- If removeLinkAddress is called with an address that is
present but with different flags, it deletes that address
instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
notification methods to take just a LinkAddress instead of
LinkAddress, flags, and scope. While I'm at it, change the
order of the arguments for consistency with the other
functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
et/BaseNetworkObserver.java
5ad421a3d00c92c155d57af9d1a05d81cc2fa88f 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Use LinkAddress in address notifications.

Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
et/BaseNetworkObserver.java
5ae4a531cc31be2868f65c40e8636658f1ae2f06 31-Oct-2013 Lorenzo Colitti <lorenzo@google.com> Pass DNS server info notifications to observers.

These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
et/BaseNetworkObserver.java
5c7daac2e3d9020185699ba554d763b825ab1778 05-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Notify IP address changes to interface observers.

1. Add addressUpdated and addressRemoved methods to
INetworkManagementEventObserver. (The -Updated method is not
called -Added because it gets called for both adds and
changes.) Update all its callers in the tree.
2. Make NetworkManagementService parse IP address notifications
from NetlinkHandler and call the address{Removed,Updated} on
its observers.

Bug: 10232006
Change-Id: Ieb185dbba052bdbff03caafc0cf5397a7f04dc6d
et/BaseNetworkObserver.java
df86a9f2e92d077386b146fe483b2cf14850737d 20-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Make BaseNetworkObserver available to core code

Currently BaseNetworkObserver is in frameworks/base/services, but
there is code in frameworks/base/core that could use it. This
code typically extends INetworkManagementEventObserver.stub
because BaseNetworkObserver is not available.

Move BaseNetworkObserver to frameworks/base/core without changing
its package name, and use it to simplify two callers. The third
caller, Tethering, is much larger, and I'm not sure it's
appropriate to change it.

Bug: 10232006
Change-Id: Ifc0f2e619e3424e27e35730c048a1cc523df345e
et/BaseNetworkObserver.java
2d6c580262ba1c19fc4f20c3566889e332fbdcb6 03-May-2012 Jeff Sharkey <jsharkey@android.com> Support full 32 bits for socket tags.

Bug: 5321184
Change-Id: Iadb3a4ad541ef012cea35b70ad440eca4c879f42
etworkManagementSocketTagger.java
418d12dc8f2c518b673ebc522de4af6f7dbf0bf3 14-Dec-2011 Jeff Sharkey <jsharkey@android.com> Avoid reading network stats when disabled.

Bug: 5518868
Change-Id: Idb5c588b018bf735597ad7ff904ecc69224dd0a0
etworkManagementSocketTagger.java
98a4f7e7e12effb78b3d1035e5a670ccbbf5bca1 03-Sep-2011 JP Abgrall <jpa@google.com> NetworkManagement SocketTagger: Migrate QTagUid support to JNI.

* Instead of javaland trying to write commands to
/proc/net/xt_qtaguid/ctrl
use the libcutils/qtaguid.c support via JNI.
* Get rid of tagToKernel() handled by qtaguid library.

Requires libcutils changes from c/132538/

Change-Id: I9de5b3fa4a596c56835024c6d376769a0eea7db1
etworkManagementSocketTagger.java
36bd9844f88cd0eb90e94b45bf5b4aa27d4d5628 17-Aug-2011 JP Abgrall <jpa@google.com> core/java NetworkManagement: Don't untag sockets willy-nilly

Tagging is conditional on having some useful info to tag.
But untagging had not such restriction leading to unnecessary kernel
calls that just fail with EINVAL.

b/5165619

Change-Id: Idd4b1dc45db04429f85e3ba37656640a8d33046a
etworkManagementSocketTagger.java
b5d55e302d2253e4bfb233ea705caf258cdc4cb9 11-Aug-2011 Jeff Sharkey <jsharkey@android.com> Foreground/background network stats using sets.

Teach NetworkStats about "counter sets" coming from kernel, and use
them to track usage in foreground/background. Add AID_NET_BW_ACCT to
system_server so it can control counter sets.

Move to composite key of NetworkIdentitySet, UID, set, and tag when
recording historical usage. Persisting still clusters by identity,
since that is heaviest object.

Request async stats poll during systemReady() to bootstrap later
delta calculations. Reset kernel counters when UID removed. Update
various tests.

Bug: 5105592, 5146067
Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
etworkManagementSocketTagger.java
a63ba59260cd1bb3f5c16e395ace45a61f1d4461 20-Jul-2011 Jeff Sharkey <jsharkey@android.com> Add operation counts to network statistics.

Provide API to increment "operation counts" for a UID and tag, used
to eventually derive bytes/operation stats. Internally is stored at
network layer, but should belong at data layer. Switch profiling
to use data layer stats, which are emulated by summarizing network
layer details.

Read packet counts from new /proc/ columns and collect them into
NetworkStatsHistory. Prevent double-counting by ignoring values from
first snapshot. Watch for duplicate /proc/ entries. Update tests
to verify packet and operation counters.

Bug: 5052136, 5097392
Change-Id: I1832f65a2b8a9188f8088f253474a667c21a2f09
etworkManagementSocketTagger.java
eaef351afcd586d5a84e80455f12f72fd12213ef 19-Jul-2011 Alon Albert <aalbert@google.com> Add a getter for the active tag

Change-Id: I597e041867fba7efae41feea63fa196bc10e4aa2
etworkManagementSocketTagger.java
62a2c8fed9cc74e9fa03871e0022205560a681a1 14-Jul-2011 Jeff Sharkey <jsharkey@android.com> Control socket tagging through Settings.Secure.

When NetworkManagementService starts, it determines if qtaguid
should be enabled. The changes pushes the enabled state to a system
property to control socket tagging.

Change-Id: I5697a990dbaad4b220a2fb055931b18077d07a74
etworkManagementSocketTagger.java
d0d2517d52fedcc7f85e0d661eecdb861f85c66e 07-Jul-2011 Jeff Sharkey <jsharkey@android.com> Temporarily disable socket tagging.

Change-Id: Ib4a8babdbbe3ea05057dc930b67c2cac89ac5e42
etworkManagementSocketTagger.java
8568db534118fc14cc28100306d51626464ff319 29-Jun-2011 Jesse Wilson <jessewilson@google.com> Move socket tagging from libcore.

Change-Id: I7515896936c5bbd212c88e2801b831914219a925
etworkManagementSocketTagger.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
esettableTimeout.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
esettableTimeout.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
esettableTimeout.java