1434 Commits

Author SHA1 Message Date
Deepanshu Gupta
d97d60c0fa Add orientation to configuration for layoutlib.
Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
2013-07-12 15:54:08 -07:00
Deepanshu Gupta
279c00e8e0 Add missing native methods.
Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
2013-05-23 16:44:01 -07:00
Ying Wang
03ce5b5366 Fix build.
Change-Id: I1fedbbb521305e02502ddb23a96b5ee96fa43b7b
2013-04-26 15:54:44 -07:00
Kenny Root
f99177f394 Merge "Update preloaded classes" into jb-mr2-dev 2013-04-26 22:20:35 +00:00
Kenny Root
9787b80ea8 Update preloaded classes
Bug: 5213043
Change-Id: I272500ce7f6ea6bfbc624c9705f8c8b8ef1aa0ad
2013-04-26 13:38:07 -07:00
Jeff Brown
caf7b0a155 Generate SDK docs for v7 support library packages.
This change required fixing some bugs in how AAPT handles
qualified symbols such as "android:layout_height"
when generating JavaDoc links.  The links were being
generated using the package name of the generated R file
rather than the package name of the referenced symbol.
These broken links caused the JavaDoc build to fail.

Bug: 8175766
Change-Id: I52fbef27825a25abca960cb44b59c2132267e9d6
2013-04-26 00:20:42 -07:00
Xavier Ducrohet
a068eeddc9 Revert "Make --non-constant-id generates non final IDs for styleable."
This reverts commit 8730f46ae5ba9021a0e01c068ffc6b552b6c4510.
2013-04-13 09:48:01 -07:00
Xavier Ducrohet
8730f46ae5 Make --non-constant-id generates non final IDs for styleable.
This was already done for all other types of resources, but not
for styleable (or the constants for the styleable array indices).

This fixes this. This only affects the SDK as this is used by the
SDK toolchain only.

Change-Id: Idfc2f7915be2b0e88590f38fd660610ffc7e160c
2013-04-12 16:02:54 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jeff Brown
3a2854bcee Merge "Queues, queues, queues and input." into jb-mr2-dev 2013-04-08 23:59:24 +00:00
Jeff Brown
f9e989d5f0 Queues, queues, queues and input.
Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper.  Consequently interactions with the
InputChannel might occur on the wrong thread.  Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity.  The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed.  This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects.  Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously.  Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
2013-04-08 15:31:47 -07:00
Nick Kralevich
745a42bbb9 Merge "aapt: add support for optional uses-permission" into jb-mr2-dev 2013-04-05 00:23:11 +00:00
Nick Kralevich
1bcc3d691f aapt: add support for optional uses-permission
Applications can request a permission with android:required="false".
For example:

<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false" />

Make aapt understand such permissions.

Bug: 8522021
Change-Id: I7d3af64e7c3eca608316d5bea19c4ea639dd2b7a
2013-04-03 16:32:40 -07:00
Brian Colonna
b1b9a8ac07 FUL now restarts when flipping tablet 180 (bug 7484464)
When a tablet rotates, FUL must be stopped and restarted in a new
position.  90 degree rotations cause a configuration change, causing
FUL to be automatically reconstructed in the new location.  However,
a 180 degree rotation is not a configuration change, so FUL was not
restarting.  A 180 degree rotation happens more often than one might
think.  If you set the tablet down and later picked it up in the
opposite orientation, FUL would not work prior to this fix.

This change adds a rotation watcher to KeyguardFaceUnlockView.  It
watches for 180 degree rotations and stops and restarts FUL
accordingly.

The rotation watcher callback must be unregistered when
KeyguardFaceUnlockView is recreated (as during 90 degree rotation
changes), otherwise the number of rotation watcher callbacks will keep
growing and they will never go away.  This is a problem not just
because there are many callbacks hanging around, but also because the
old callbacks end up trying to access biometric unlock views that no
longer exist, resulting in crashes.  So, a simple function was added
to the window manager to unregister a rotation watcher.

Change-Id: Ie1ef20a9a22b8f4e39918987dff2b8ad444fcfd1
2013-03-29 18:35:43 -04:00
Dianne Hackborn
f3d46ce88f Fix build.
Change-Id: I51b87ee5f0b7f396aad7e239893d9f0764f04bb6
2013-03-26 18:00:42 -07:00
Dianne Hackborn
4ec6cc5108 Fix build.
Change-Id: Iaa70b05a3cfd372518ec35aa8bcea2f9d78b8292
2013-03-05 10:28:05 -08:00
Craig Mautner
2e5528c5e0 Merge "Revert ActivityManager changes for tasks. DO NOT MERGE" into jb-mr2-dev 2013-02-26 01:08:28 +00:00
Craig Mautner
2ad920759b Revert ActivityManager changes for tasks. DO NOT MERGE
Keeping all activity=>task changes in master and removing them
from jb-mr2.

Revert "Update histories simultaneously."
Revert "Add null check to setAppGroupId."
Revert "Fix crashing bug in validator."
Revert "Switch topRunning* and moveTaskTo*"
Revert "Begin switch over to task based history."
Revert "Reset and reuse Iterators and don't new() one."
Revert "Remove AppWindowToken lists."
Revert "Fix build."
Revert "Remove unused App methods."
Revert "Stop using AppToken movement and start using Task."
Revert "Replace access to mAppTokens with AppTokenIterator"
Revert "Refactor setAppOpVisibility implementation."
Revert "Add AppWindowTokens to TaskList."
Revert "Make ActivityStack.mHistory private."
Revert "Migrate AppWindowToken lists into DisplayContent."

Change-Id: I5722c9a4956dccb52864207e2967690bc58e4ebb
2013-02-25 17:07:39 -08:00
Dianne Hackborn
ec559ff78c Fix typo.
Change-Id: I71c8458e02dc9b9a4c59e51ded37b57a930038f9
2013-02-25 15:42:07 -08:00
Dianne Hackborn
c4aad01cbb Formalize overscan metrics.
The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets.  This is used to correctly
position the various UI elements in the various combination
of layout options.  In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly.  Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area.  The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
2013-02-22 19:14:37 -08:00
Jim Miller
29ae06633d am ec6156f9: Merge "Fix the build."
* commit 'ec6156f9e884ba85c76a9c4683f83f18b3f64afa':
  Fix the build.
2013-02-20 17:08:24 -08:00
Jim Miller
ef04a9b7e1 Fix the build.
Change-Id: If53878937fe1ca01ad8db9f9d201d0f9aaaec81b
2013-02-20 16:58:59 -08:00
Dianne Hackborn
4f7fb00f6c am ee973c27: Fix build.
* commit 'ee973c27e339a23e0b93d816a97b33954af66bea':
  Fix build.
2013-02-19 13:38:49 -08:00
Dianne Hackborn
ee973c27e3 Fix build.
Change-Id: I277de38a70f3a2e5c1997a3fe5c2e825692ae9e1
2013-02-19 13:36:32 -08:00
Laurent Tu
34ab0a4a18 am 7c93839d: Revert "Tentative fix for aidl import issue"
* commit '7c93839d7b41727c11925b034d4ec84491d3dee1':
  Revert "Tentative fix for aidl import issue"
2013-02-15 16:11:26 -08:00
Laurent Tu
7c93839d7b Revert "Tentative fix for aidl import issue"
Fix build.

This reverts commit 4f115e08cb68aaf77693f3f4598f0eb5f7634777.

Change-Id: Ic4f51e3492f54afec5f0eeb48e08491eb47f3c04
2013-02-15 16:07:56 -08:00
Laurent Tu
1662cf99b6 am 8acb27c5: Merge "Tentative fix for aidl import issue"
* commit '8acb27c505c610b4027ec3d140ccc7722ab4faa3':
  Tentative fix for aidl import issue
2013-02-15 15:19:22 -08:00
Laurent Tu
8acb27c505 Merge "Tentative fix for aidl import issue" 2013-02-15 23:16:08 +00:00
Laurent Tu
4f115e08cb Tentative fix for aidl import issue
Fix issue when aidl generation doesn't use the right type when
it is a suffix of a pre-declared type.

eg. android.location.Location and foo.android.location.Location. The
aidl generation will never use foo.android.location.Location.

The tentative fix reverses the order in which Namespace.Search iterates
through the known types.

A better fix would be to annotate the types that are declared in the
aidl import statements to be prioritary in Namespace.Search. Lmk if I
you agree with this approach and think that this is worth the work.
Thanks!

Change-Id: I97dd1a1d417075accf1d61f9aba5aba3dea175c6
2013-02-14 16:12:54 -08:00
Craig Mautner
102f711043 am 534d136a: Merge "Remove unused App methods."
# Via Android (Google) Code Review (1) and Craig Mautner (1)
* commit '534d136aa66fb13f7c1b482513627de45c218c29':
  Remove unused App methods.
2013-02-14 10:16:57 -08:00
Craig Mautner
b0c0b1fd70 Remove unused App methods.
Now that the Task methods have replaced the App methods remove
the App methods.

Change-Id: I0e7432f2c6f99708759ed8c871d20eb5bd38c3c2
2013-02-13 15:24:14 -08:00
Chris Craik
c932760f66 Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE" 2013-02-13 23:14:58 +00:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
	packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-02-13 10:50:20 -08:00
Dianne Hackborn
b47e6c77b3 Merge "Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!" 2013-02-12 23:54:56 +00:00
Xavier Ducrohet
4f0dd02d00 am 36ee5485: am 5d5c05de: am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android Git Automerger (3) and others
* commit '36ee5485b85e34008dc31e0f7bace1b2516c5db5':
  Fix DateFormat for layoutlib.
2013-02-12 15:54:02 -08:00
Xavier Ducrohet
36ee5485b8 am 5d5c05de: am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '5d5c05dee9911eaf8add2d4298641e60f2a113d5':
  Fix DateFormat for layoutlib.
2013-02-12 15:52:46 -08:00
Xavier Ducrohet
5d5c05dee9 am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android (Google) Code Review (1) and others
* commit 'b7a4aed94eb02731057fdf78eb7bafc8ececadc9':
  Fix DateFormat for layoutlib.
2013-02-12 15:50:16 -08:00
Xavier Ducrohet
b7a4aed94e am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android (Google) Code Review (1) and Xavier Ducrohet (1)
* commit 'f70b8c1cebbf873031bc92bb6ae3be813830d300':
  Fix DateFormat for layoutlib.
2013-02-12 15:48:07 -08:00
Dianne Hackborn
56a2301c7a Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
2013-02-12 15:41:49 -08:00
Xavier Ducrohet
47a021f764 Fix DateFormat for layoutlib.
Change-Id: I389c9d106b93b9f81dd3614398a5b66ba2b39a70
2013-02-12 14:05:32 -08:00
Derek Sollenberger
23e500d168 Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" 2013-02-06 12:57:38 +00:00
Dianne Hackborn
961321fe4e App ops: add op for writing settings.
Also fix a build.

And fix a bug that I think was introduced in the multi-user work
that removed the permission check for writing to settings...!

Change-Id: I5945682faa789ffc78fd3546c0df7d03693f106d
2013-02-05 17:22:41 -08:00
Svetoslav
5cf6f8adfa am 573a18cc: Merge "Fixing the build"
# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit '573a18ccd883d18046dea600855d34f5c9a57fa8':
  Fixing the build
2013-01-29 02:15:48 -08:00
Svetoslav
f5f7d9751a Fixing the build
Change-Id: I8d47c7094efc8ff458cdac58a761d5f187c8fc32
2013-01-29 02:08:54 -08:00
Dianne Hackborn
c152e16b07 am 8fea4e72: Merge "Rework ParceledListSlice to be much easier to use."
* commit '8fea4e72e4dcff9fa76168b9e26cf5907102f70b':
  Rework ParceledListSlice to be much easier to use.
2013-01-18 16:20:40 -08:00
Dianne Hackborn
d8e1dbb6bc Rework ParceledListSlice to be much easier to use.
Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation.  Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
2013-01-18 13:02:26 -08:00
Justin Koh
73d94a30a2 am ba1992f8: Merge "Remove doSingleCrunch call DO NOT MERGE" into jb-mr1-aah-dev
* commit 'ba1992f8e9e50ca58f007ff528d2f6d2c2b18223':
  Remove doSingleCrunch call DO NOT MERGE
2013-01-16 16:21:28 -08:00
Justin Koh
3944abbb50 Remove doSingleCrunch call DO NOT MERGE
Remove doSingleCrunch call as it's breaking jb-mr1-aah-dev.

Change-Id: I0d8ee55344792fd868e74e07f31641a85e71168a
2013-01-16 14:51:29 -08:00
Dianne Hackborn
7ed6c6d83b am 35654b61: More work on App Ops service.
* commit '35654b61e8fe7bc85afcb076ddbb590d51c5865f':
  More work on App Ops service.
2013-01-16 12:14:53 -08:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00