306 Commits

Author SHA1 Message Date
Adam Powell
7c86958d73 Merge "Add MediaRouter API." into jb-dev 2012-06-03 14:11:43 -07:00
Adrian Ludwig
361dfebc94 For JB, the READ_EXTERNAL_STORAGE permission is not enforced by default. It may be enforced by default in future releases. Developers have the option of enabling enforcement to test their application and some may begin to include this permission on applications. To avoid user confusion, the permission is placed in the development tools group.
Change-Id: Id27ba241db0253eac774401aaaa6e5c4340588d7
2012-06-01 19:57:57 -07:00
Adam Powell
9a1de308ce Add MediaRouter API.
This is just the initial state tracking. Still to go is
actually triggering Bluetooth A2DP correctly and tracking
process state in the system server.

Change-Id: I33031d52799d6e2d7208910da833831085cc3677
2012-06-01 18:19:20 -07:00
Adrian Ludwig
4c52235fbc Revert "Make the protectionLevel of framework permissions consistent and related to sensitive user data. Dangerous permissions are applied only where sensitive user data may be exposed."
This reverts commit a8a200278dcc232eabd4550f814439c94857c47c.

Conflicts:

	core/res/AndroidManifest.xml
	core/res/res/values/strings.xml

Change-Id: I3f76d93a6ffde031bf82c2afea315ebcdbc179e3
2012-06-01 14:22:03 -07:00
Alice Yang
727c599454 New UI for account picker
- Added radio buttons to indicate the selected item
- "Add account" is one of the list options instead of a button
- Removed icons
- Added "Cancel" and "OK" buttons
- Use dialog theme
- Omit description text by default

Bug 6505441

Change-Id: I672a11481ee99e183142142bddf8f97b7b149d37
2012-05-29 13:31:04 -07:00
Svetoslav Ganov
1e7456ba74 Fixing the build for real.
Change-Id: I792d029c7fff4d96fbe238ff4b3f268cb8603b95
2012-05-16 19:15:34 -07:00
Svetoslav Ganov
e63049b838 Adding some missing files.
Change-Id: I991d8bf815a7e57dc1cbad384e15aa21bef0c7c7
2012-05-16 18:27:34 -07:00
Jeff Brown
507f5586fb Hide SET_KEYBOARD_LAYOUT permissions.
Bug: 6427036
Change-Id: Idbb442ad8071b2ca4acf247b135c7aba0830cf70
2012-05-07 19:06:06 -07:00
Dianne Hackborn
99222d212f Finish up issue #6249094: Display permissions based on relevance to private data
Added bitmaps for permission group icons.  We had to pick either
icons for a dark or light background, and it had to be light for
settings, so the installer theme has gone back to dark.

Tweaked the permission groups to match the icons.

Redid the group priorities to make them correct (they were written
with higher priorities being less important).

Fixed bug where priority was not being used for system apps.

Change-Id: Ia3d3f0c1614a11b4cfd11682ce9e6c9f87d75c06
2012-05-06 17:45:13 -07:00
Adrian Ludwig
dc410cb349 Reorganizing permissions into groups oriented around user-understandable concepts.
These groups are assigned priority for sort-order when displayed to users, and use
the new permissionGroupFlags to indicate whether they contain personalInfo.

Change-Id: I27e81912e08b8d7766b8ce449b4b3bd6473d8f07
2012-05-02 09:56:41 -07:00
Dianne Hackborn
fd5015be41 Add new APIs for permission group flags and priorities.
Change-Id: I2d476c6aa9dbd05407ec49be45986f42d2acf9e7
2012-04-30 18:19:09 -07:00
Jeff Sharkey
098d580cc2 Migrate ringtone playback to SystemUI.
Introduce IRingtonePlayer, which handles playback for both Ringtone
objects and Notifications. SystemUI now hosts this player, which it
registers with AudioService. It also keeps MediaPlayer instances
warm, and cleans them up after stop() or Binder death.

Move both Ringtone and NotificationManagerService to play back audio
through this new interface.

Bug: 6376128, 6350773
Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
2012-04-27 14:15:05 -07:00
Mike Lockwood
8f014059d3 Make audio routing Intents protected
These intents should only be sent by the system:

android.intent.action.HEADSET_PLUG
android.intent.action.ANALOG_AUDIO_DOCK_PLUG
android.intent.action.DIGITAL_AUDIO_DOCK_PLUG
android.intent.action.HDMI_AUDIO_PLUG
android.intent.action.USB_AUDIO_ACCESSORY_PLUG
android.intent.action.USB_AUDIO_DEVICE_PLUG

Change-Id: I7be41892a9c4e619ca3e1c892fad6f1f2714c74f
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-04-26 11:31:58 -07:00
Jeff Sharkey
6dcf382b1b Move RINGTONE_PICKER to handle external storage.
To give RINGTONE_PICKER external storage access, move it from system
to MediaProvider.  Fix OOBE when getRingtoneUri() kicked requery().

Bug: 6346701
Change-Id: I837002eef0580b8cdd8920a27b068c745995a8a3
2012-04-25 14:56:13 -07:00
Michael Jurka
2c8e19e81f Merge "New API to allow third-party apps to bind widgets" 2012-04-24 19:06:14 -07:00
Michael Jurka
61a5b0160d New API to allow third-party apps to bind widgets
Change-Id: I1a3761c1a0f557a32d4d3bdd0207567fec918ba7
2012-04-24 17:25:08 -07:00
Dianne Hackborn
8238e717df Add new signature-level permission to get details of tasks.
Third party apps now can't get access to the extras of the
intents associated with tasks, to keep private data in them
from leaking out.

Change-Id: I95af9e181ac42557bc8b981807e7ddd266a88d0e
2012-04-24 14:27:02 -07:00
Jake Hamby
d65c2be548 Merge "Add ContentProvider for apps to read received SMS cell broadcasts." 2012-04-19 16:15:42 -07:00
Jeff Sharkey
35be756030 Move SystemUI out of system UID.
Add permissions for various things it pokes.  Create new permission
to control launching non-exported activities from recents.  Hidden
API to relax WallpaperService checks.

Change-Id: I547fdcd7c213dd153ae101533ce7c56cd8f86a0d
2012-04-19 11:54:34 -07:00
Jake Hamby
c3296ffdfc Add ContentProvider for apps to read received SMS cell broadcasts.
The CellBroadcastReceiver app will allow apps with the new permission
"android.permission.READ_CELL_BROADCASTS" to read previously received
cell broadcast messages from a new ContentProvider database at URI
"content://cellbroadcasts". This will enable third parties to provide
additional information to users in the event of emergencies without
delaying or interfering with the initial system alert dialog to warn
the user when the alert is received.

Includes a new android.telephony.CellBroadcastMessage class which
can be instantiated from the Cursor retrieved from the ContentProvider.
This was previously a part of the CellBroadcastReceiver app, but can now
be used by third party apps with read permission on the ContentProvider.

Change-Id: I2c31f62b63c050c7946de2d81c28a5f4dc6f00b0
2012-04-18 16:41:19 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -07:00
Dianne Hackborn
e824120016 Hide the optional permission stuff, not making it in to JB.
Also lock down the rest of the development tools permissions to
be development permissions that must be granted through an
explicit shell command.

Change-Id: I1ba216fffe1aab4bb9f83fcef108efc504f892f4
2012-04-06 13:39:09 -07:00
Jeff Brown
ac14351e16 Move some APIs from window manager to input manager.
Simplified input injection API down to just one call.

Removed all input state reading API.  It was only used by the
window manager policy and required a permission that applications
could not obtain.  READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
2012-04-05 19:33:11 -07:00
Nick Kralevich
5b8fd25029 Merge "Make READ_LOGS signature|system|development" 2012-03-27 14:55:34 -07:00
Amith Yamasani
135936072b User management and switching
Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
  and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
2012-03-27 11:23:01 -07:00
Nick Kralevich
cb5863e022 Make READ_LOGS signature|system|development
Change-Id: I387d53ac4b7fd3d65891145985e4cd272dffddcf
2012-03-23 13:18:36 -07:00
Daniel Lehmann
53567a756e Merge "Introduce READ_CALL_LOG and WRITE_CALL_LOG" 2012-03-13 12:17:45 -07:00
Dianne Hackborn
7924512aa1 Add new READ_EXTERNAL_STORAGE permission.
Also adds some initial compatibility code for dealing with it.

Change-Id: I104bff11798349e4aaa6da9b7be787b257daa1bb
2012-03-12 15:07:31 -07:00
Daniel Lehmann
f06d9497af Introduce READ_CALL_LOG and WRITE_CALL_LOG
Bug:6141864

Change-Id: I66fcab2a35b8c1c73bac7cfffb9f008c82ed51e8
2012-03-12 13:45:19 -07:00
Christopher Tate
8662cab5c6 Merge: Introduce UpdateLocks
An "UpdateLock" works similarly to a wake lock in API: the caller is
providing a hint to the OS that now is not a good time to interrupt
the user/device in order to do intrusive work like applying OTAs.
This is particularly important for headless or kiosk-like products
where ordinarily the update process will be automatically scheduled
and proceed without user or administrator intervention.

UpdateLocks require that the caller hold the new signatureOrSystem
permission android.permission.UPDATE_LOCK.  acquire() and release()
will throw security exceptions if this is not the case.

The "is now convenient?" state is expressed to interested parties
by way of a sticky broadcast sent only to registered listeners.  The
broadcast is protected; only the system can send it, so listeners
can trust it to be accurate.  The broadcast intent also includes a
timestamp (System.currentTimeMillis()) to help inform listeners that
wish to implement scheduling policies based on when the device became
idle.

The API change here is a tiny one: a dump(PrintWriter) method has been
added to the TokenWatcher class to facilitate getting information out
of it for dumpsys purposes.  UpdateLock itself is still @hide.

Bug 5543442

Change-Id: I3709c831fc1883d7cb753cd2d3ee8e10a61e7e48
2012-02-29 14:05:24 -08:00
Dianne Hackborn
e639da7baa New development permissions.
These are permissions that an application can request, but won't
normally be granted.  To have the permission granted, the user
must explicitly do so through a new "adb shell pm grant" command.

I put these permissions in the "development tools" permission
group.  Looking at the stuff there, I think all of the permissions
we already had in that group should be turned to development
permissions; I don't think any of them are protecting public APIs,
and they are really not things normal applications should use.

The support this, the protectionLevel of a permission has been
modified to consist of a base protection type with additional
flags.  The signatureOrSystem permission has thus been converted
to a signature base type with a new "system" flag; you can use
"system" and/or "dangerous" flags with signature permissions as
desired.

The permissions UI has been updated to understand these new types
of permissions and know when to display them.  Along with doing
that, it also now shows you which permissions are new when updating
an existing application.

This also starts laying the ground-work for "optional" permissions
(which development permissions are a certain specialized form of).
Completing that work requires some more features in the package
manager to understand generic optional permissions (having a
facility to not apply them when installing), along with the
appropriate UI for the app and user to manage those permissions.

Change-Id: I6571785c6bb5f6b291862b7a9be584885f88f3a5
2012-02-23 16:39:15 -08:00
Svetoslav Ganov
25872aa3ef Adding shell commands for modifying content.
1. Added methods to the ActivityManagerService remote interface
   that allow accessing content providers outside of an application.
   These methods are guarded by an internal signature protected
   permission which is given to the shell user. This enables a
   shell program to access content providers.

2. Implemented a shell command that takes as input as standart
   fagls with values and manipulates content via the content provider
   mechanism.

Change-Id: I2943f8b59fbab33eb623458fa01ea61a077b9845
2012-02-15 14:55:47 -08:00
Mike Lockwood
b01e8bf57b New Serial Manager API:
SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:19 -08:00
Dianne Hackborn
a573f6a1d9 Some hardening of isolated processes by restricting access to services.
Services now must explicitly opt in to being accessed by isolated
processes.  Currently only the activity manager and surface flinger
allow this.  Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration.  The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.

The activity manager now protects most of its entry points against
isolated processes.

Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
2012-02-09 18:06:01 -08:00
Dave Santoro
9be4962060 Merge "Unhide social stream permissions." into ics-mr1 2011-11-17 12:26:17 -08:00
Dave Santoro
098d466a25 Unhide social stream permissions.
Bug 5569021

Change-Id: I35ee70418be0e0286294fef54e194831b5fa3b2c
2011-11-17 11:02:03 -08:00
Jean-Michel Trivi
20cf0916cc Merge "Bug 5585323 New system permission for media decode" into ics-mr1 2011-11-09 08:57:43 -08:00
Jean-Michel Trivi
4ba27fe702 Bug 5585323 New system permission for media decode
Add a system permission to enable the use of any installed
media decoder when decoding for playback (as opposed to transcode).

Change-Id: Ifb10a5fa8d5663a78ccbb5fa8266ad6535c234f2
2011-11-08 11:36:26 -08:00
Robert Greenwalt
8588e47358 Fix build.
Missed a commit that fixed some issues.
bug:5237167

Change-Id: I61e44831e2c3f1cf613ca1387aa95d712b7d2ded
2011-11-08 10:12:25 -08:00
tk.mun
148c7d0de7 Wimax : wimax framework related open source.
Integrate wimax network related changes into Android Framework.
- In Connectivity service, start wimax service.
- 4G icon display in StatusBarPolicy.
- DHCP renew add.
- Add radio for wiamx

Change-Id: I2d9012247edfdf49d71ca7e1414afd0006f330ca
Signed-off-by: tk.mun <tk.mun@samsung.com>
bug:5237167
2011-11-07 14:47:40 -08:00
Dave Santoro
0b61f59d77 Add new permissions for read/write social stream.
This is a manual merge of a change going in to ICS-FactoryROM.

These permissions are needed to separate the (potentially invasive)
access to the user's social stream from the existing read/write
contacts permission.

Per discussion with Android release team, we are also hiding the
stream item API until we figure out a better way to guard the data.

Bug 5406886

Change-Id: I8339d743c3ebe8923c7ee47f2900444efcf82a52
2011-10-04 15:35:48 -07:00
Fred Quintana
b04fe4e82a Continuation of the unified account chooser flow.
- made the UI match the spec
 - added ability to force the account chooser to appear
 - added ability to pass in a description that will override the stock one
 - added ability to pass in requiredFeatures for addAccount
 - added ability to pass in an authTokenType for addAccount

Bug: 5293377
Change-Id: I243c0fd6598c943b1f65753e1f5d3c86629f64f5
2011-09-16 22:55:08 -07:00
Fred Quintana
1121bb5e6f Add a generic account chooser/add account flow for apps.
The activity is launched as follows:
  Account account1 = new Account("account1@gmail.com", "com.google")
  Account account2 = new Account("account2@gmail.com", "com.google")
  ArrayList<Account> accounts = new ArrayList<Account>();
  accounts.add(account1);
  accounts.add(account2);
  String[] accountTypes = new String[]{"com.google", "com.android.exchange"};
  Bundle addAccountOptions = null;
  Intent intent = AccountManager.newChooseAccountIntent(account1, accounts,
    accountTypes, addAccountOptions);
  startActivityForResult(intent, 0);

Change-Id: I05a467bdc3552a2e39397b0182879351f4324389
2011-09-15 17:40:43 -07:00
Dianne Hackborn
d2509fd835 Add boot mode where only "core apps" are started.
A core app is one that has coreApp="true" in its manifest tag.

The system can successfully boot (though a little painfully) with
only framework-res.apk, SettingsProvider.apk, SystemUI.apk,
DefaultContainerService.apk, and Launcher2.apk set as core apps.

Currently this boot mode is always turned off.

Change-Id: Ieaa4a8031c2c391a12996aa8d8b1d65fc2b09d6b
2011-09-12 12:29:43 -07:00
Dianne Hackborn
905577f634 Fix issue #5263361: Browser instance not created in application picker
The resolver activity was hiding the following activity from recents.

Also some other fixes: a little better memory use debugging, removed
some unneeded code from window manager, moved some system activities
into their own process, added some more running process information for
manage apps.

Change-Id: I66687d16989ff965d524b92dc360f37c19199717
2011-09-08 10:35:11 -07:00
Jaikumar Ganesh
b6ae19a96d Remove connection access intents from protected broadcasts.
These intents are sent by Bluetooth-Pbap app which doesn't
have the system uuid. Instead protect with admin permission
on the reciever side.

Change-Id: Ibb788e1526108909b5a3b15462ac3a008b041613
2011-09-07 17:20:08 -07:00
Jaikumar Ganesh
81e23acb0b Add Bluetooth intents to protected broadcasts.
Change-Id: I3734a4ff7d964c64ce39ec3f897d3799aa9653f7
2011-09-06 13:07:17 -07:00
Robert Greenwalt
cccdd721e9 Make WRITE_APN_SETTINGS a system-only permission.
Protects us from apps getting packet snooping ability
(ie, routing all your traffic through their server by
modifing your APN settings).  We may eventually revert this
if/when we have time to provide a proper API and scary UI
like VPN has.

bug:5242750
Change-Id: I71d73807ca5268c6aacc2156839b4d11427048c4
2011-09-01 12:30:47 -07:00
Jeff Sharkey
961e304583 Introduce immediate CONNECTIVITY_ACTION variant.
New broadcast that is dispatched immediately after connectivity
changes have been handled by ConnectivityService, bypassing any
applicable CONNECTIVITY_CHANGE_DELAY.

Also protect CONNECTIVITY_CHANGE broadcasts, since they should only
be sent by system.

Bug: 5198167
Change-Id: I75f1fb44b21da1879f0ab960bcaa481126d70fde
2011-08-29 16:10:43 -07:00
Jake Hamby
463f221145 Add ISIM application support for LTE devices.
- Add methods to TelephonyManager to provide access to IMS records on
  the ISIM application of the UICC, as well as access to the ISIM
  AKA authentication algorithm.

- Add support for the new IMS methods to CDMALTEPhone, using the helper class
  ImsUiccRecords to load the IMS records from the ISIM. The same approach
  can be used to implement IMS support for UMTS/LTE devices.

- There is a new RIL request, RIL_REQUEST_ISIM_AUTHENTICATION, which is
  used to perform IMS AKA authentication using the algorithm on the ISIM
  application of the UICC. The challenge nonce and response are both encoded
  as Base64 strings.

Change-Id: I73367c7d9bc573d0d883d68adf09891de1319129
2011-08-26 12:33:11 -07:00