13784 Commits

Author SHA1 Message Date
Adam Lesinski
2c8d67c9b0 Various CTS fixes
WallpaperManager should always do a null check on the service object.
SystemServer should always bring up the DevicePolicyManagerService,
and let the service do appropriate default no-ops if the feature
is not supported.

Change-Id: Iaaf12b60ed375fe2e341ec11faa10c9344d7d9da
2014-04-25 11:07:39 -07:00
Dianne Hackborn
522ff52f88 Merge "Initial implementation of new voice interaction API." 2014-04-25 17:02:19 +00:00
Dianne Hackborn
91097de49b 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
2014-04-24 17:48:58 -07:00
Elliott Hughes
5f5ca3bc98 am 31a1dd2a: Merge "Use the suggested public API instead of libcore.os."
* commit '31a1dd2a8f56b439861ee335b55f44323318830c':
  Use the suggested public API instead of libcore.os.
2014-04-24 23:55:09 +00:00
Jungshik Jang
0792d37385 Implement skeleton of new HDMI Control Service.
HdmiCecService is a system service handling HDMI-CEC features
and command. Recently we found out that industry has more
requirements to support HDMI-CEC. Also, MHL is another
standard should be in our pocket. Basically, MHL is
a standard to support communication between mobile device
and TV or Av device. As CEC is a control standard over HDMI
cable, MHL has control channel for peer device.
There behavior is very similiar. Both have commands that
can change Tv's current input and can send/receive key
to other device to control other deivce or TV.

In order to cover both CEC and MHL, current HdmiCecService
implementation has limitation. We had several
session of discussion and decided to refactor
HdmiCecService into HdmiControlService.
For each standard it will have separate controller instance
like HdmiCecController and HdmiMhlController.

In this change I didn't touch original HdmiCecService
because some component, like cast receiver, uses HdmiCecService.
For a while we will keep HdmiCecService until HdmiControlService
accomodates all features of HdmiCecService.

Change-Id: I5485280ab803dbf071d898bfbe34be0b11ce7958
2014-04-25 08:37:51 +09:00
Elliott Hughes
cacbe1b1ef Use the suggested public API instead of libcore.os.
Change-Id: Id392e4c36c5721ca609d88d9ec6b9340ce05274c
2014-04-24 16:19:27 -07:00
Neil Fuller
caf6497b9a am 683cf1bf: Merge "Changes to support asynchronous close interruption"
* commit '683cf1bffe33f49f26d46201f96cd2eff60e8192':
  Changes to support asynchronous close interruption
2014-04-23 16:45:15 +00:00
Neil Fuller
43582df3db Changes to support asynchronous close interruption
This change contains fixes to base from libcore change
I37de3e7d1a005a73821221e6156d10b95c595d7a

Bug: 13927110

Change-Id: I2d96e50307611c269dcf47886cd4d976854da8fc
2014-04-23 16:40:35 +00:00
Nick Kralevich
5246f4599a am d267c1a0: Merge "remove unneeded import statements."
* commit 'd267c1a06fc91dc300d5c5f8b7ef9bd44825c34e':
  remove unneeded import statements.
2014-04-22 19:52:21 +00:00
Nick Kralevich
3ab7882a57 am a67d4a6e: Merge "remove unused import."
* commit 'a67d4a6e4da1eb02a15a1048a26329cfed312938':
  remove unused import.
2014-04-22 19:52:18 +00:00
Nick Kralevich
d267c1a06f Merge "remove unneeded import statements." 2014-04-22 19:24:47 +00:00
Nick Kralevich
c826257bf3 remove unneeded import statements.
Internal master is out of sync with AOSP. Resync.

Change-Id: Ia3105a4b6eb835f719471a26ae4cb33962c5b19e
2014-04-22 12:17:51 -07:00
Nick Kralevich
8cb5abcfde remove unused import.
This change resynchronizes AOSP with internal master.
The import line is unused.

Change-Id: I98bef1f88dee758f5bdcec35fba204f793d4028e
2014-04-22 12:10:24 -07:00
Jeff Davidson
6a4b220f12 Initial implementation of NetworkScoreManager's backing service.
This service will ultimately be responsible for propagating scores
down to lower-level network subsystems. For now, it just keeps scores
in memory and exposes these for debugging purposes via "adb shell
dumpsys network_score".

This change also adds provisioning of a default scorer. When
NetworkScoreService is first initialized, it checks to see if it has
ever set a default scorer; if not, it reads a package name from a
build config property and attempts to set it as the default.

Also add autogenerated equals/hashCode methods to all parcelables.

Bug: 14111427
Bug: 13786258
Change-Id: I02271171653d42e12acd240b73b9e23950744f6b
2014-04-21 16:04:05 -07:00
Elliott Hughes
90e2301e23 am d2a11d97: Merge "Add explicit close of Scanner input"
* commit 'd2a11d97a94bed18629bded429f118f57f4f7821':
  Add explicit close of Scanner input
2014-04-11 17:18:14 +00:00
Elliott Hughes
d2a11d97a9 Merge "Add explicit close of Scanner input" 2014-04-11 17:14:39 +00:00
Narayan Kamath
1d26a3f1ef am 09e13cc5: Merge "System services detect and register app CPU ABIs"
* commit '09e13cc5f9f98382376eb49bfa6ceb94a50d37a1':
  System services detect and register app CPU ABIs
2014-04-10 09:23:33 +00:00
Narayan Kamath
0fd40cb100 am 80413c9f: Merge "Re-implement native library search and copies."
* commit '80413c9fe10acf36eaecd139198c7fc17e8af2e6':
  Re-implement native library search and copies.
2014-04-10 09:23:30 +00:00
Ramin Zaghi
ff0c470833 System services detect and register app CPU ABIs
This patch uses the NativeLibraryHelper class to
match native libraries in an .apk package with
those listed in 'ro.cpu.abilist' property.
The result is stored in packages.xml and the
ApplicationInfo class.

This information will be used by the ActivityManager
to decide which zygote to use to launch the given
app.

Change-Id: I3ec3d050996d8f4621f286ca331b9ad47ea26fa0
2014-04-09 17:20:13 +01:00
Ramin Zaghi
1378aba7ae Re-implement native library search and copies.
We now use a two step approach :

- First we look through the list of shared libraries in an
  APK, and choose an ABI based on the (priority)  list of ABIs
  a given device supports.
- Then we look through the list of shared libraries and copy
  all shared libraries that match the ABI we've selected.

This fixes a long-standing bug where we would sometimes copy
a mixture of different ABIs to the device, and also allows us
to clearly pick an ABI to run an app with.

The code in NativeLibraryHelper has been refactored so that all
file name validation & matching logic is done in a single place
(NativeLibrariesIterator). This allows us to avoid a lot of
redundant logic and straightens out a few corner cases (for eg.
where the abi determination & copying logic do not agree on
what files to skip).

bug: https://code.google.com/p/android/issues/detail?id=65053
bug: 13647418

Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef
Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com>
Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com>
Co-Authored-By: Narayan Kamath <narayan@google.com>
2014-04-09 17:16:40 +01:00
Amith Yamasani
5784b39843 Merge "Launcher APIs and broadcasts for managed profiles" 2014-04-08 22:04:20 +00:00
Jae Seo
3957091ba8 Initial round of Television Input Framework
This provides APIs to control and create individual television inputs on
the system which will later be hosted by television applications.

Change-Id: I6866d28e78175a1bff2c32a85c5d77e94d0cd60c
2014-04-08 13:35:21 -07:00
Amith Yamasani
4f58263d02 Launcher APIs and broadcasts for managed profiles
UserManager
- Corp badging
- Querying list of managed profiles

Launcher API
- LauncherApps and Service to proxy changes in managed profile
  to the launcher in the primary profile
- Querying and launching launchable apps across profiles

Change-Id: Id8f7b4201afdfb5f414d04156d7b81300119289e
2014-04-08 10:51:05 -07:00
Craig Mautner
228cefa83d am 3fb2b713: Merge "[ActivityManager] Reduce report ANR on wrong activity."
* commit '3fb2b7132b64c65163e7c6cd948e45f703e93687':
  [ActivityManager] Reduce report ANR on wrong activity.
2014-04-07 22:14:56 +00:00
riddle_hsu
309ca5d947 [ActivityManager] Reduce report ANR on wrong activity.
Symptom: ANR report on wrong activity.

Root Cause:
  KK changed resume behavior that will not update focus when only resume,
if the activity blocked, it may report ANR on previous focus.
  By original concept, it will try to correct the ANR target,
but the stack of waiting(waitingVisible=true) activity may
different with current top stack.
  If it gets key dispatch timeout, mResumedActivity and mPausingActivity
of its stack will be null becuase it is not top stack.
Then it is unable to change ANR target to the real no response activity.

Solution:
 Use focused stack to get the real culprit.

Reproduce steps:
1.Launch an Activity X from launcher, press home key.
2.Launch X from launcher again, X blocks(sleeps 15sec) in onResume, press back key in the beginning of blocking duration.
3.ANR dialog shows launcher is no response.

Change-Id: I99416ad91e349096f995990f2240a97616fbaf28
2014-04-08 02:44:03 +08:00
Alan Viverette
b325345ef0 Merge "Switch framework Holo references to Quantum.Light" 2014-04-02 22:15:16 +00:00
Narayan Kamath
b69bb44558 resolved conflicts for merge of 71ab4f4f to master
Change-Id: I888c231f7579523e12fbd68f820f0775019e51e0
2014-04-02 11:52:07 +01:00
Narayan Kamath
71ab4f4f48 am ea9e5eca: am 17b1b8fe: Merge "Move zygote startup logic to the frameworks."
* commit 'ea9e5ecac1e5240370f0e3f998b9c8b159ee9320':
  Move zygote startup logic to the frameworks.
2014-04-02 10:41:24 +00:00
Narayan Kamath
ea9e5ecac1 am 17b1b8fe: Merge "Move zygote startup logic to the frameworks."
* commit '17b1b8fe8c0c8f05f2077acc82428881bf591a78':
  Move zygote startup logic to the frameworks.
2014-04-02 10:35:38 +00:00
Narayan Kamath
973b4663b0 Move zygote startup logic to the frameworks.
The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
  logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
2014-04-02 10:18:43 +01:00
Alan Viverette
6259933ec9 Switch framework Holo references to Quantum.Light
Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
2014-04-01 14:57:39 -07:00
Nick Kralevich
e531e2ec6b am 3b2a9d22: Merge "Change when the SELinux relabel of /data/data occurs."
* commit '3b2a9d22794cb9f1c2a28884b5c3ba92ecc6ff96':
  Change when the SELinux relabel of /data/data occurs.
2014-03-31 20:14:37 +00:00
Nick Kralevich
3b2a9d2279 Merge "Change when the SELinux relabel of /data/data occurs." 2014-03-31 20:09:31 +00:00
Adrian Roos
82142c21dd Define trust agent framework components
Adds the TrustManager system service that allows
registering for changes to the trust status and
reporting events that are important to trust agents.

Bug: 13723878
Change-Id: I7d0d2ea86fd755702d31aa5d49cac038a6cd4301
2014-03-31 21:18:28 +02:00
Narayan Kamath
439cf5b433 am 56a8f8b4: resolved conflicts for merge of 439145f0 to klp-modular-dev-plus-aosp
* commit '56a8f8b48ff1d0855209307b9076d6e9b348b59b':
  Don't make isSafeMode a field on the Zygote class.
2014-03-31 13:16:16 +00:00
Narayan Kamath
56a8f8b48f resolved conflicts for merge of 439145f0 to klp-modular-dev-plus-aosp
This isn't a straightforward conflict resolution. This code
has changed significantly. mSafeMode is now a flag on the activity
manager service, and is set when SystemServer calls enterSafeMode.

Change-Id: I1e8ff524566c5e44bb6bf3b138cdebb70004aca3
2014-03-31 14:10:53 +01:00
Narayan Kamath
439145f0e7 am ab561f5b: Merge "Don\'t make isSafeMode a field on the Zygote class."
* commit 'ab561f5b4073055c414866ff3dbe8372263474a7':
  Don't make isSafeMode a field on the Zygote class.
2014-03-31 12:42:14 +00:00
Narayan Kamath
d1a8d9f452 Don't make isSafeMode a field on the Zygote class.
This field is written and read exclusively by the system server,
and should therefore belong to the SystemServer class.

Change-Id: I2708a9a45c0c9cd1a6f563e8cc5844bd8c424bf7
2014-03-31 13:16:45 +01:00
Craig Mautner
155e313340 am d511bc17: Merge "[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off."
* commit 'd511bc17d614b1291f1b85f84180c1db157d2790':
  [ActivityManager] Fix a bug: unable to start activity after starting activities during screen off.
2014-03-28 22:16:38 +00:00
Craig Mautner
d511bc17d6 Merge "[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off." 2014-03-28 20:27:33 +00:00
Craig Mautner
ff3362f0d8 Merge "DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front." 2014-03-28 20:23:34 +00:00
Robert Craig
172d38bcda Change when the SELinux relabel of /data/data occurs.
Perform the relabel of the /data/data/<pkg> directories
when the app is being scanned by the PMS. The impetus
for this change was that the data directories of forward
locked apps were receiving the wrong label during an
OTA. Because the PMS doesn't actually scan forward locked
apps til later in the boot process, the prior restorecon
call was actually applying the default label of
system_data_file for all such apps. By performing a
restorecon on each individual app as they are entered into
the PMS we can handle them correctly. This mechanism also
allows us to pass down the seinfo tag as part of the
restorecon call which drops our need to rely on the contents
of packages.list.

Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2014-03-28 12:24:29 -04:00
Craig Mautner
a282441038 Merge "Do not show Home behind full screen activity" 2014-03-27 20:01:11 +00:00
Yevgen Pronenko
0fd4c656d0 Do not show Home behind full screen activity
When ensureActivitiesVisibleLocked goes through foreground activity
stack and reaches non-fullscreen activity, it sets showHomeBehindStack
variable to true.

If there is a fullscreen activity behind, showHomeBehindStack remains
unchanged, which causes Home application to be displayed anyway.
In this case user will see a fullscreen activity and Home activity
simultaneously.

To fix the issue we set showHomeBehindStack to false when we reach
fullscreen activity in the activity stack.

This was made visible by the following commit:
446ef1de8d373c1b017df8d19ebf9a47811fb402

Change-Id: I535c1283a4e26f5cf606375b837d4b7195324af0
2014-03-27 07:54:37 +01:00
Stephen Smalley
e6e25554d3 Note libselinux dependency on packages.list format changes.
Change-Id: I3c34a86f5706c4fca826a8634936131e4e4fc297
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-03-26 09:19:12 -04:00
riddle_hsu
739e194121 DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front.
Symptom: ANR occurs on previous activity.
Root Cause:
In KK, when a background activity starts another existed background activity (bring to front),
if current focused stack is not the same as the stack of target starting activity,
it will still resume the top of target stack, even the top activity on the target stack may not the same as target activity.
And it will result incorrect focus, press back key will send to previous stack's top then popup ANR on previous activity:
"Reason: Waiting because no window has focus but there is a focused application".

By original code comment, it looks 'bring to front' should not happen in this issue case.
// If the target task is not in the front, then we need
// to bring it to the front...  except...  well, with
// SINGLE_TASK_LAUNCH it's not entirely clear.  We'd like
// to have the same behavior as if a new instance was
// being started, which means not bringing it to the front
// if the caller is not itself in the front.

If the caller and target are in the same stask, it will just deliver new intent without changing task order (the same behavior as JellyBean).
So the patch concept is just to avoid to use target stack to resume top when caller and target are in different stack.

Solution: Do not allow to resume another stack top if non-top activity try to bring existed activity to front.
It may not be a good solution, just a reminder for the issue case.

Reproduce steps:
Assume A, B, C are different app tasks.
When the application stack is like:
  Top C
      B
      A

 #Case 1: Home is foreground
  A starts B with NEW_TASK, C will resume, focus still stays at Home, and window order does not update.
  Then press back key or volumn key will result ANR on Home.

 #Case 2: App is foreground (Resumed activity is C)
  A starts Home, Home will resume, focus still stays at C, and window order does did not update.
  Then press back key or volumn key will result ANR on C.

Change-Id: If05070123b248e2335791e43a4d4ddee6db11d84
2014-03-26 20:43:17 +08:00
Yuhao Zheng
10bf6354a5 Wifi hotspot stack initial hook up
Add a dummy wifi hotspot service for futher development use. This is to
resolve the different between master branch and kwd branch, such that future
development can go into kwd and being auto-merged to master.

bug: 5485670
Change-Id: Ica58de445dd050a9f0b817f8e4accaa2478299c5
2014-03-25 15:00:45 -07:00
Craig Mautner
e6e9b14c99 am 9bbd2f97: am 2cacc619: Merge "Don\'t wait for finishing animation when second display is disconnected"
* commit '9bbd2f977ba4d6c4642f96673f937a677ff0beb2':
  Don't wait for finishing animation when second display is disconnected
2014-03-25 17:26:28 +00:00
Craig Mautner
df7da51311 am ca903d38: am 81e094d7: Merge "Move task to top in window manager." into klp-dev
* commit 'ca903d3809ccd78b73b634ff7591863dbed55823':
  Move task to top in window manager.
2014-03-25 17:02:13 +00:00
Craig Mautner
81e094d76b Merge "Move task to top in window manager." into klp-dev 2014-03-25 16:48:38 +00:00