Commit Graph

3595 Commits

Author SHA1 Message Date
Wale Ogunwale
6a5913681e Make activities trageting SDK N or greater resizeable by defualt
Also, removed condition that prevented activity from setting
device orientation if it is resizeable. We only need to prevent
it from affecting the orientation when it isn't fullscreen and
not all the time. Work is being tracked in bug 24685213.

Bug: 19865400
Change-Id: I9e1ea77c6acd13801a06f791e0b8859fbcb0f15c
2015-10-06 09:12:02 -07:00
Todd Kennedy
3da3ca609e Merge "Update PackageInstaller install handing" 2015-10-01 14:15:41 +00:00
Roozbeh Pournader
0223804e05 Merge "Add LocaleList support to content.res.Resources." 2015-09-30 21:13:57 +00:00
Todd Kennedy
a1d12cfdb0 Update PackageInstaller install handing
* Allow forcing permission check. We want to modify the PackageInstaller to
use the PackageInstallerSession for better security / remove deprecated APIs.
In order to do this and continue to prompt for permissions, we need to prevent
the PakcageInstaller from auto-approving the permissions.

* Add originating UID to SessionParams. This is used for package verifier
checks.

Bug: 22282121
Change-Id: I19079749d20ace66f1332f399d52cb0fb8784cd9
2015-09-30 14:11:33 -07:00
Nicolas Prévot
8392b394f2 Merge "Add more methods that take a userId to PackageManager." 2015-09-29 10:00:56 +00:00
Roozbeh Pournader
47571c76af Add LocaleList support to content.res.Resources.
Also remove the adjustLocales() method, since it's no longer possible
to create non-adjusted Locale objects using the public API.

The implementation is still in progress: currently only the first
locale in the list is passed down to the native code.

(Also fix the order of imports based on Android style.)

Change-Id: I325d7a2c0d86a9bf5cd202081f0b02299660364a
2015-09-28 14:29:21 -07:00
Bryce Lee
535570a7ce am 979a22ea: am 6ad696c3: am f0740e0a: Merge "Add ThermalObserver system service to capture thermal state uevents." into cw-e-dev
* commit '979a22eaf9c62637c02ebd6f92ef6ea2888aa5be':
  Add ThermalObserver system service to capture thermal state uevents.
2015-09-27 15:11:22 +00:00
Bryce Lee
979a22eaf9 am 6ad696c3: am f0740e0a: Merge "Add ThermalObserver system service to capture thermal state uevents." into cw-e-dev
* commit '6ad696c35b80f70f19de304b53bdbfc6f5a265d8':
  Add ThermalObserver system service to capture thermal state uevents.
2015-09-26 06:55:22 +00:00
Bryce Lee
bc58f59da6 Add ThermalObserver system service to capture thermal state uevents.
Bug: 21445745
Change-Id: I980d60b66ca51942a1fd62502d6cf1f09208fc3a
2015-09-25 16:43:01 -07:00
Nicolas Prevot
9a80e53b27 Add more methods that take a userId to PackageManager.
Add methods installPackageAsUser and installExistingPackageAsUser
and deletePackageAsUser and getPackageInfoAsUser.

BUG:23516394
Change-Id: I15e30d2ec45ab18c7f8c0ac02cfc617c50fedb44
2015-09-24 10:57:51 +01:00
Xiaohui Chen
a449062220 Cleanup USER_OWNER in activity and location services
Bug: 19913735
Change-Id: Ie2b7acb3fa53b1dcf7319de1eb5bdec585dbf78c
2015-09-23 18:51:18 +00:00
Nicolas Prévot
3355eca23e Revert "Add more methods that take a userId to PackageManager."
This reverts commit 3b0fc3cf24.

It breaks the build. I had missed other places that extend PackageManager.

Change-Id: Iff012ed4ec8d2d32821586eca85fce55ae67f5b5
2015-09-23 11:34:38 +00:00
Filip Gruszczynski
bc5a6c5f0c Preserve windows during stack resize.
It also adds debugging information for configuration changes, so it's
easier to observe what exactly changes.

Change-Id: Ia2cd4df9a868a8cea216ce137d67a1bb8ed2e6c7
2015-09-22 15:23:34 -07:00
Nicolas Prevot
3b0fc3cf24 Add more methods that take a userId to PackageManager.
Add methods installPackageAsUser and installExistingPackageAsUser
and deletePackageAsUser and getPackageInfoAsUser.

Change-Id: I9a3ff96f968b4f8d21a57cc7760679628d35c1a9
BUG:23516394
2015-09-21 11:39:42 +01:00
Christopher Tate
f3d939cc73 At install, require the presence of code if hasCode=true
Bug 23875788

Change-Id: I125ea4caf9e558e875e36dc8534f0d0877ff1e89
2015-09-18 10:19:20 -07:00
Fyodor Kupolov
cf9f751206 am fd464a30: am 71b4b738: am d20f2106: am bfc584df: Merge "Use app directory as apkPath for cluster installs" into mnc-dr-dev
* commit 'fd464a301fea9395ad2b882dc90b0fee6515e9d1':
  Use app directory as apkPath for cluster installs
2015-09-16 21:26:25 +00:00
Fyodor Kupolov
fd464a301f am 71b4b738: am d20f2106: am bfc584df: Merge "Use app directory as apkPath for cluster installs" into mnc-dr-dev
* commit '71b4b738a611565659df33fe56635d75a25e6f19':
  Use app directory as apkPath for cluster installs
2015-09-16 21:19:57 +00:00
Fyodor Kupolov
d20f210650 am bfc584df: Merge "Use app directory as apkPath for cluster installs" into mnc-dr-dev
* commit 'bfc584df683a84dffd8e04b7b13f619606a0a42a':
  Use app directory as apkPath for cluster installs
2015-09-16 21:02:53 +00:00
Rob Carr
3acde12254 Merge "Correct ActivityInfo constructors." 2015-09-16 17:51:21 +00:00
Robert Carr
3e2e011785 Correct ActivityInfo constructors.
ActivityInfo was missing initialization for the
documentLaunchMode flag in the copy-constructor
and the Parcel constructor. The copy-constructor
is used in multi-user/profile mode to create a
seperate instance of the ActivityInfo per uid
and this was manifesting in the linked bug.

Bug: 21590915
Change-Id: I6f71d94ec32ec6326d23c9b62e9d8d319e2fa25e
2015-09-15 20:58:32 +00:00
Vinod Krishnan
0f07424dc5 am f274e325: am aae9c4ab: am 74c3a0e7: Merge "Add some constants for Wear MNC Perms" into cw-e-dev
* commit 'f274e3252b263d9e001a8de9d55c065f353ad02f':
  Add some constants for Wear MNC Perms
2015-09-14 22:43:51 +00:00
Vinod Krishnan
f274e3252b am aae9c4ab: am 74c3a0e7: Merge "Add some constants for Wear MNC Perms" into cw-e-dev
* commit 'aae9c4ab35ac98e8106d6a57d9d094780fbb0189':
  Add some constants for Wear MNC Perms
2015-09-14 22:36:29 +00:00
Vinod Krishnan
74c3a0e7b4 Merge "Add some constants for Wear MNC Perms" into cw-e-dev 2015-09-14 22:23:25 +00:00
Alex Hills
d04c6d19a5 resolved conflicts for 693e11e5 to mnc-dr-dev-plus-aosp
Change-Id: I701841759a80f434a09b086492e817ca23a6a2e6
2015-09-14 17:03:58 -04:00
Vinod Krishnan
61665cc4ae Add some constants for Wear MNC Perms
- Add an API for getting list of apps that has runtime perms

Change-Id: I4ebfc01033ea96efaac062fd34982fbd0d081073
2015-09-14 13:16:18 -07:00
Alan Viverette
3d2337eeb5 Cherry-pick system theme rebase to fix square UI on round watches
Our system themes were based on configurations that were added post-
init of the system theme.

I96e695441543379e4d5fdf3cc6f18d9e6cf953b4 broke this, because there
was a race condition in the code for rebasing themes

If8fecde76d62738a8e55eddf898eafc468afdba2 (the cherry-picked commit)
fixes the race condition and adds the rebasing back in.

This change cherry picks If8fecde76d62738a8e55eddf898eafc468afdba2.

Bug:23387146
Change-Id: I0725028e48599fc6cd9731ae16c71474dd5827e5
2015-09-14 10:56:02 -04:00
Christopher Tate
b911676209 Avoid parceling redundant ApplicationInfo objects within PackageInfo
Two benefits:

  1) marshaling one flattened ApplicationInfo as part of a PackageInfo parcel
     rather than one per included ComponentInfo; and

  2) producing one ApplicationInfo at unmarshaling time and sharing the
     reference to it among all included ComponentInfo instances, rather
     than the previous implementation that generated a separate
     ApplicationInfo instance for each ComponentInfo.

In some cases there can be many hundreds of ComponentInfo objects embedded
in a single PackageInfo, so coalescing duplicates is a significant win
for both payload size and object pressure.

Bug 19519502
Bug 20453802

Change-Id: Ib888810dad4471084fab9ead1ebb5e0b932905f1
2015-09-10 14:04:01 -07:00
Fyodor Kupolov
ebcac16cb1 Use app directory as apkPath for cluster installs
Previously, size of of oat directory was not counted by the getsize command,
because base APK location was passed as apkpath argument.

Bug: 23896047
Change-Id: Ic7b6b725785ff2e2a0cf3887ba68c162b23b1212
2015-09-10 10:44:49 -07:00
Tao Bai
ab5bca1519 Merge "Load app resource as shared library." 2015-09-09 16:08:12 +00:00
Tao Bai
a6d7e3fb9c Load app resource as shared library.
- Added aapt command line flag --app-as-shared-lib to build app resources
  that could be loaded as shared lib at runtime.
- Added new method AssetManager.addAssetPathAsSharedLibrary() to load an
  app resource as shared library.

Bug 22487604

Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
2015-09-08 18:48:42 -07:00
Wale Ogunwale
b1a4bf2c4b Ignore empty locale list when diffing Configuration objects
b46fdd4 introduced the concept of locale list to Configuration objects.
However, the change alway returned a locale difference when the delta
object locale list is set to the defualt (empty). We now don't return
a difference if the delta object as an empty locale list which is
consistent with what we did before the change and in line with how we
diff other configuration fields.

Bug: 23744091
Change-Id: I8c2c39d9a7e91e6a3a283312b745c4fdf6874396
2015-09-03 15:08:51 -07:00
Roozbeh Pournader
cdc5673633 Merge "Make res.Configuration support locale lists." 2015-09-01 17:55:49 +00:00
Nick Kralevich
26637cb3fd am 1293b953: am 712205ba: am 9d586927: Merge "Automatically assign default seinfo labels using the string "default"."
* commit '1293b953c4c82dfc8738ba1dfc48f7739df78c69':
  Automatically assign default seinfo labels using the string "default".
2015-09-01 17:06:15 +00:00
Nick Kralevich
712205bac0 am 9d586927: Merge "Automatically assign default seinfo labels using the string "default"."
* commit '9d586927102b597845607ccc82661e350821de82':
  Automatically assign default seinfo labels using the string "default".
2015-09-01 16:37:59 +00:00
Robert Craig
5e16bc5a14 Automatically assign default seinfo labels using the string "default".
default seinfo values are those for which policy lacks a
matching stanza in the corresponding mac_permissions.xml
file. Prior to this change the null object reference was
used to represent the non-matching state. This is in
contrast to a policy supplied default stanza which will
assign a non null seinfo value. Confused yet?

Basically, two default states were distinguished in the
code to describe the two cases where either a policy stanza
spelled out the base case seinfo label or not. Policy
writers could either supply a default stanza or rely on
the class instantiated value assigned by the ApplicationInfo
object. The hope was that the later assignment could be
used to help distinguish the cases where policy writers
intentionally white listed apps. This change will just use
the hard coded "default" string implicitly to describe all
cases and removes the idea of a policy supplied default stanza.

Change-Id: Ib7b01ee004775f24db9a69340a31784b967ce030
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-09-01 05:51:04 -04:00
Fyodor Kupolov
3f1099b062 Merge "Non-system users can now have restricted profiles" 2015-08-28 21:44:54 +00:00
Roozbeh Pournader
b46fdd427c Make res.Configuration support locale lists.
We also deprecate the locale attribute, but works around the cases in
which people would call it.

Also add various methods to LocaleList to support the features
Configuration requires.

Change-Id: Iacc537e5fc1a3d4c1ea7e5517347876ca4e07e0a
2015-08-27 17:54:01 -07:00
Fyodor Kupolov
06a484adb9 Non-system users can now have restricted profiles
In the non split system user, only USER_OWNER is allowed to have restricted
profiles. This is now changed in split user mode, where multiple secondary
users can have restricted profiles.

Added UserInfo.restrictedProfileGroupId field, which defines parent/child
relationship between secondary users and linked restricted profiles. Adjusted
shared accounts handling logic to not assume that USER_OWNER is the only owner.

Bug: 23191995
Change-Id: I5f3fc2aa4f229103d6e75ec2c3dfce866b8007de
2015-08-27 15:38:29 -07:00
Alan Viverette
02fc5fef36 Extract drawable inflation to its own class, inflate from class name
Bug: 22627299
Change-Id: Icd2ac88af4f3102e08e52f6f0f7565839da6437a
2015-08-27 13:16:09 -04:00
Fyodor Kupolov
2170ee43a1 Merge "Limit the number of apps running as system user" 2015-08-26 22:14:36 +00:00
Fyodor Kupolov
d3a182e573 Merge "Renamed primaryUserOnly to systemUserOnly" 2015-08-26 17:25:51 +00:00
Fyodor Kupolov
7db5af124e Limit the number of apps running as system user
For the system user, enable apps based on the following conditions:
- app has no launcher icons or has INTERACT_ACROSS_USER_FULL permission
- app is whitelisted
- app is not in the blacklist

Bug: 23283899
Change-Id: I90fa266e8cfb28d002e5f792998fdddb6a1e6969
2015-08-26 10:18:10 -07:00
Fyodor Kupolov
4f5de340c9 Renamed primaryUserOnly to systemUserOnly
In the split mode, broadcast receivers and activities marked as
systemUserOnly will be running as system. This is a non-functional change for
non-split system user mode.

Bug: 22958572
Change-Id: I0f7d4f4a81275bc326bf630a776c695e8b5291a6
2015-08-25 18:26:49 -07:00
Xiaohui Chen
bd0e03bb76 More USER_OWNER cleanup.
Bug: 19913735
Change-Id: I408a92d9dbab2a096407efccb91e2a8bdc22714d
2015-08-24 16:42:37 +00:00
Filip Gruszczynski
db0fa33f44 Merge "Using initial activity layout to position the launching activity." 2015-08-24 14:39:03 +00:00
Filip Gruszczynski
9b1ce52f25 Using initial activity layout to position the launching activity.
The activity can be positioned in the center or in one of the corners.
From there it shifts its position and tries to find a spot where it
doesn't collide with other activities.

The CL also includes a few fixes necessary to pipe the information about
the initial layout through the system.

Change-Id: I2aaf5b6d20044aafec713b7bd4193b05cfbd16f3
2015-08-24 07:35:38 -07:00
Fyodor Kupolov
3a22ad0ac4 am 09dbd46a: am 037281d4: am 563f974d: am d7cdbd4d: am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit '09dbd46af8faa60419a97e926463dc25fbd0513f':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-22 01:22:32 +00:00
Fyodor Kupolov
09dbd46af8 am 037281d4: am 563f974d: am d7cdbd4d: am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit '037281d4a9a22fa55b643e785ff32144cfa61591':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-22 00:41:08 +00:00
Fyodor Kupolov
950297d27f am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit 'e6c64508aba566b5bd4ac9cd87a07358b13f5a06':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-21 23:12:14 +00:00
Fyodor Kupolov
e6c64508ab Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev 2015-08-21 23:04:09 +00:00