139 Commits

Author SHA1 Message Date
Romain Guy
870e09fcd2 Fixes #1963229. Introduces Context#isRestricted().
A restricted Context is a special type of Context that prevents specific features
from being used. For instance, android:onClick, used by View, can be dangerous when
used from within apps widgets. By using a restricted Context to inflate apps widgets,
widgets providers are prevented from using android:onClick.
2009-07-06 16:45:17 -07:00
Romain Guy
4296fc4d32 Fixes #1444844. Set a maximum fling velocity in scrollable views. 2009-07-06 11:48:52 -07:00
Marco Nelissen
816cf52abd Fix the DEFAULT_SORT_ORDER value for media files. Changing this
is OK, because existing app will have the old value compiled in
as a literal, and so will continue to (not) work in the same
way as before. Add code to media key generator to give a leading
ascii \001 the special meaning of "sort first".
2009-07-06 09:58:06 -07:00
Jean-Michel Trivi
62788e9b48 Unhide android.speech.tts.TextToSpeech 2009-07-02 16:29:30 -07:00
Mike LeBeau
f763e8f42d Add new attribute 'searchSettingsDescription' for use within an app's
searchable.xml. This attribute defines the string to be shown as the
description a searchable in the 'searchable items' section of system
search settings.
2009-06-30 18:26:21 -07:00
Dianne Hackborn
1dac277f93 Implement issue #1943927 (need notification in status bar when adb is active)
This is a little hacky -- we just assume that if adb is enabled and power
is connected through usb, then it is active.

The icons and text are temporary until final design is provided.
2009-06-30 13:40:51 -07:00
Romain Guy
b5537c4522 Replace indeterminate progress animated asset with new ones 2009-06-30 12:39:18 -07:00
Romain Guy
fbd8f69a84 Fixes #1946141. Introduce new caching API to control scaling.
This change fixes issues with existing applications that access the drawing cache
directly. The API now lets application choose whether they want to get a scaled
drawing cache or not. The framework relies on the scaled cache for quality
purposes.
2009-06-26 16:56:32 -07:00
Dianne Hackborn
723738cfae Expand support for different screen sizes.
Applications can now declare that they support small, normal, or
large screens.  Resource selection can also be done based on these
sizes.  By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes.  In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
2009-06-26 13:37:05 -07:00
Dianne Hackborn
2bacbdfb51 Add new APIs to LauncherActivity to be used elsewhere. 2009-06-24 19:03:15 -07:00
Bjorn Bringert
5f80605a0b Include user query in search intents
This change adds a new intent extra field USER_QUERY set in intents
launched by the search dialog. It contains the query as typed by
the user, unaffected by query jamming or search suggestions.

Fixes http://b/issue?id=1939592
2009-06-24 12:54:28 +01:00
Romain Guy
e29f064383 Fixes #1905761. Updates the height of ACTV's drop down whenever the IME changes. 2009-06-23 21:27:02 -07:00
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
Leon Scroggins
9ce4c6c5cf Make browser bookmarks permissions part of the public API. 2009-06-22 09:14:02 -04:00
Wei-Ta Chen
8cdcb12752 Add prepareToDraw() to Bitmap for fixing http://b/issue?id=1907995.
The function is used to rebuild any caches associated with the bitmap.
In the case of purgeable bitmaps, this call ensures that the pixels
are decoded for drawing, and therefore prefetching techniques
implemented by callers can be leveraged.
2009-06-22 18:01:47 +08:00
Jean-Michel Trivi
a6fcc95411 Added in Settings.Secure default country and variant for the default TTS language. 2009-06-19 14:18:41 -07:00
Dianne Hackborn
3d74bb4ab2 Add "why?" button to low battery dialog.
This takes the user to the power usage activity.
2009-06-19 11:46:58 -07:00
Wu-cheng Li
649f99e834 Add Intent.ACTION_SEND_MULTIPLE
Activities can use this intent to send multiple data.
2009-06-19 18:48:37 +08:00
Dianne Hackborn
5c1e00b14d Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
- Fix a bug where targetSdkVersion could not be set if minSdkVersion.  Stupid, stupid.
  Also make sure to fail if minSdkVersion is for a code name.  Really stupid.

- Change the API for resize compatibility mode to be a bit in the flags field, instead
  of a separate boolean.

- Implement delayed dexopting, to avoid the looong full dexopt during boot.  This is
  only enabled for "eng" builds.  When in this mode, the activity manager will make
  sure that a dexopt has been done before loading an .apk into a process, and will
  try to avoid displaying ANRs if they are due to the dexopt causing some operation
  to take longer than it normally would (though I make no guarantees about this
  totally working).

- Add API to Context to get the ApplicationInfo for its package, for easy access to
  things like targetSdkVersion.
2009-06-18 17:10:57 -07:00
Dianne Hackborn
c14b9ccdf1 Extend Intent/Uri conversion for use by Browser
This introduces a new Uri form of Intent with an "intent:" scheme, and a
corresponding update to the parser to handle these, so that the browser
can use this generic facility for starting activities based on the links
that are clicked and allow for web pages to link to arbitrary intents.

There is also a new "package" field on Intent which allows you to limit
the components it finds to a given package.  This replaces the new method
that was added to PackageManger for doing this when resolving activities,
and implements it for all Intent queries against the package manager.
2009-06-17 21:48:14 -07:00
Suchi Amalapurapu
1ccac75e1f Remove circular dependency in PackageManager. api freeStorage uses PendingIntent from android.app
Create a new public IntentSender class that can be used by PackageManager instead.
This new class uses IIntentSender internally and can only be created by PendingIntent for now.
Provide a new getIntentSender api in PendingIntent to create an instance of this class.
Move IIntentSender and IIntentReceiver from android.app to android.content
Change imports of IIntentSender and IIntentReceiver to reflect the new package name
The PackageManager api has been named as freeStorageWithIntent and will be renamed as freeStorage
once the older api(which has been deprecated) will be removed shortly.
2009-06-17 11:31:26 -07:00
Dianne Hackborn
4ebd855bb7 Fix build. 2009-06-15 17:44:07 -07:00
Dan Egnor
2d4b6ad9d4 Remove obsolete FOTA_UPDATE permission (which should never have been
made public, and wouldn't be used by any third party applications,
and no longer does anything regardless).

Also remove the WRITE_GSERVICES permission from the SettingsProvider
package's manifest (the declaration there was redundant with the one
in the core manifest, where all the other settings-related permissions
live -- no other core package includes its own permission definitions).
2009-06-15 16:29:20 -07:00
Dianne Hackborn
29148f90cd Remove ADD_SYSTEM_SERVICE and SET_PROCESS_FOREGROUND permissions.
These are no longer used.
2009-06-15 15:25:31 -07:00
Romain Guy
763a572388 Hide gestures API. 2009-06-12 10:28:28 -07:00
Joe Onorato
23ecae3bbb Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
This took quite a bit of refactoring.
2009-06-11 11:29:57 -07:00
Satish Sampath
d82108993f NEW_API: Expose queryAfterZeroResults searchable attribute.
If this attribute is provided and true, the searchable activity will be invoked for all queries in a particular session.
If set to false and the activity returned zero results for a query, it will not be invoked again in that session for supersets of that zero-results query. For example, if the activity returned zero results for "bo", it would not be queried again for "bob" as an optimization.

The default value is false.
2009-06-11 17:11:50 +01:00
Jack Veenstra
53175148c9 Add support for custom tab views in TabHost and TabWidget.
This change adds the ability to specify an arbitrary view for a tab
indicator.  It also adds support for specifying a drawable to use as
the divider between tab views.
2009-06-10 11:38:02 -07:00
Romain Guy
0e1ca5749a Add support for gestures in Home.
Adds a new animation style for the gestures pad, and de-normalize
the scores in the recognition engine.
2009-06-09 22:58:46 -07:00
Jean-Michel Trivi
f478267d6a Adding default text-to-speech language in Settings.Secure. 2009-06-09 16:22:48 -07:00
Romain Guy
03f0b21b5a Fix several issues in the gestures libraries.
This mostly fixes how gestures libraries are saved and loaded.
Saving a library twice in a row was erasing the entire library,
which was preventing the sketch test app from working propertly.
2009-06-09 04:15:22 -07:00
Romain Guy
7fe416e943 Fix bug in saving gestures stores. The outputstream was wrapping itself, thus causing huge problems. 2009-06-09 01:42:15 -07:00
Suchi Amalapurapu
d299b8194d Add a new attribute to android manifest for defining the GLES version number.
This attribute is parsed by the PackageParser into ConfigurationInfo. The major
and minor version numbers are defined as the higher and lower order bits.
2009-06-05 13:49:09 -07:00
Jean-Michel Trivi
f62ba452bb Adding new Settings.Secure properties for the Text-To-Speech functionality.
Those properties are secure to prevent applications from altering the user's settings without his knowledge.
2009-06-05 11:29:16 -07:00
Mike LeBeau
48603e7fed Add new SHOW_WEB_SUGGESTIONS system setting, referenced by the search settings
(in a follow-on change). This setting, to be respected by global search, and which
I will also file a bug to the browser to respect, determines whether live web
suggestions will be shown to the user as they type. For privacy reasons, this
could be considered undesirable, as partial queries can then be sent to the user's
chosen search engine, so a setting was required.
2009-06-05 01:07:20 +01:00
Wei-Ta Chen
683f3bed89 Unhide inInputShareable in BitmapFactory.Options.
The variable works together with inPurgeable, which has been unhidden in
https://android-git.corp.google.com/g/Gerrit#change,2870.
2009-06-04 11:42:14 -07:00
Mitsuru Oshima
9189cabb0b * Moved supports-density tag under manifest
* Refactored Compatibility code
  * Added CompatibilityInfo class
  * Removed getApplicationScale from Context
  * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
  * Added expandable tag under manifest
  * Old application w/o expandable is given the default screen size  ([320, 480] x density).
  * The non-expandable window is centered.
2009-06-03 16:28:10 -07:00
Romain Guy
9af0b4f7be Add new listener to GestureOverlayView. This listener fires whenever the overlay thinks the user is starting a new gesture. This allows Home to snap the workspace back to its original position during a gesture operation. 2009-06-02 21:59:42 -07:00
Wei-Ta Chen
eb949674fd Unhide inPurgeable in BitmapFactory.Options.
The correctness and effectiveness of the usage of the parameter are evaluated in:
https://android-git.corp.google.com/g/Gerrit#change,2768
2009-06-02 11:01:43 -07:00
San Mehat
5a3a77dabd base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGE
Signed-off-by: San Mehat <san@google.com>
2009-06-01 09:25:28 -07:00
Christopher Tate
181fafaf48 Retool the backup process to use a new 'BackupAgent' class
Backups will be handled by launching the application in a special
mode under which no activities or services will be started, only
the BackupAgent subclass named in the app's android:backupAgent
manifest property.  This takes the place of the BackupService class
used earlier during development.

In the cases of *full* backup or restore, an application that does
not supply its own BackupAgent will be launched in a restricted
manner; in particular, it will be using the default Application
class rather than any manifest-declared one.  This ensures that the
app is not running any code that may try to manipulate its data
while the backup system reads/writes its data set.
2009-05-31 13:10:03 -07:00
Romain Guy
8d78756c16 Fix the build. 2009-05-29 15:02:55 -07:00
Bjorn Bringert
9fc2e9c965 MemoryFile constructor and native methods throw IOExceptions.
These native methods in android.os.MemoryFile throw IOException but their
Java declarations did not include "throws IOException":
native_open(),native_mmap(),native_read(),native_write(),native_pin()

The MemoryFile(String,int) constructor calls native_open and
native_mmap, but does not declare that it throws IOException. The other
Java methods that call the native methods do actually declare that they
throw IOException.

This means that any code that created memory files could throw
an IOException, without knowing about it.

This changes adds "throws IOException" to the native methods and to
the constructor. The constructor change changes the public API, but
maintains binary compatibility. There is some precedent for making
source incompatible source API changes for this sort of thing
(see https://mondrian.corp.google.com/changelist/124214-p9).

The change also makes the native methods static, which
they seem to have been intended to be, as indicated by the
second parameter to the native implementations being named
"clazz".

This requires changes to the Compatibility Test Suite to catch the exceptions.
This is done in https://android-git.corp.google.com/g/2617
Unfortunately that change must be submitted together with this one in order
not to break the build.

Fixes http://b/issue?id=1881829
2009-05-29 09:06:44 +01:00
Robert Greenwalt
fc1b15cfbf Fix wifi multicast API for public use.
Applying API review comments and taking it public.
2009-05-28 13:37:06 -07:00
Eric Laurent
4bc035a65c Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
2009-05-26 07:44:28 -07:00
Romain Guy
e7c36dda7a Add new orientation attribute to GestureOverlayView. This can be used to prevent the overlay from interfering with vertically/horizontally scrolling views underneath the overlay. 2009-05-25 13:51:00 -07:00
Romain Guy
ec25df9fbc Fix drawing bug: opaque invalidations should not be taken into account when the invalidated view is animating. Also add the ability to disable the auto-fade on the GestureOverlayView. 2009-05-25 04:39:37 -07:00
Romain Guy
82f3495b14 Cleanup Gestures API and make it easier to use in 3rd party apps. Also fix the events processing in the gestures overlay mechanism. Give better control of the various properties of the overlay through XML attributes. 2009-05-24 23:45:03 -07:00
Dianne Hackborn
b181118b6e Define TARGET_CPU_ABI for finding native code in .apks 2009-05-22 18:45:25 -07:00
Romain Guy
c0292b0440 Fix the build 2009-05-22 02:39:24 -07:00