About run Instrumentation

by angela....@qisda.com » Tue, 14 Apr 2009 09:28:57 GMT


Sponsored Links
 Hi all

I like to ask something about running Instrumentation.

By logs, I found that there is a uninstall process before the start
process when running the instrumentation.

Is this behavior normal?



For example, if I start the instrumentation of music

DEBUG/ActivityManager(51): Uninstalling process com.android.music

INFO/ActivityManager(51): Start proc com.android.music for added
application com.android.music: pid=241 uid=10006 gids={3003}



BRs

Angela


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Peculiar behavior with Matrix class

Hello list,



I am experiencing a somewhat peculiar behavior when inverting Matrix
objects. Specifically, the rectStaysRect property is not always
preserved correctly, even in trivial cases.

If I compile and run the following code in debug mode:

Matrix foo = new Matrix(); // Creates the identity matrix
Log.d("TEST", "foo = " + foo.toString());
Log.d("TEST", "rectStaysRect: " + foo.rectStaysRect());
foo.invert(foo); // Still the identity matrix
Log.d("TEST", "foo = " + foo.toString());
Log.d("TEST", "rectStaysRect: " + foo.rectStaysRect());

I expectedly get the following output:

D/TEST    (  353): foo = Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    (  353): rectStaysRect: true
D/TEST    (  353): foo = Matrix{[1.0, -0.0, 0.0][-0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    (  353): rectStaysRect: true

However, if the same code is compiled and run in release mode, I
instead get the following:

D/TEST    ( 3277): foo = Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    ( 3277): rectStaysRect: true
D/TEST    ( 3277): foo = Matrix{[1.0, -0.0, 0.0][-0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    ( 3277): rectStaysRect: false

Notice how the matrix values are the same (at least to the precision
printed by the logger), but the rectStaysRect property has changed
after the invert operation. Even more interestingly, if I add a
completely unrelated matrix creation, the behavior is reverted back to
the original one, regardless of whether I run in release or debug. The
following code:

Matrix foo = new Matrix(); // Creates the identity matrix
Matrix notUsed = new Matrix(); // Unrelated matrix created here
Log.d("TEST", "foo = " + foo.toString());
Log.d("TEST", "rectStaysRect: " + foo.rectStaysRect());
foo.invert(foo); // Still the identity matrix
Log.d("TEST", "foo = " + foo.toString());
Log.d("TEST", "rectStaysRect: " + foo.rectStaysRect());

again prints the expected:

D/TEST    ( 3361): foo = Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    ( 3361): rectStaysRect: true
D/TEST    ( 3361): foo = Matrix{[1.0, -0.0, 0.0][-0.0, 1.0, 0.0][0.0, 0.0, 1.0]}
D/TEST    ( 3361): rectStaysRect: true

I can reproduce this with a 100% success rate on a Nexus One running
2.3.3. I have not been able to reproduce it reliably on the emulator
(I believe I saw it happen at least once, but currently it always
gives me the correct output, so I will not swear on it).

I am guessing one difference between the three cases could be that the
JIT is stepping in in the second one, but not the first or third. How
can I check this?

And what exactly is the semantics of rectStaysRect()? Does "false" as
return value only mean we do not know whether the matrix maps a
rectangle to a rectangle? If not, what happens in the second case
above ought to be a bug.



Best regards,

Josef

-- 

2. Sharing Data between applications

Hi,
I have 3 applications
Application A - Display the Employee information
Application B - Gives report of Employee
Utility application - Connects remote database and share the employee
data between application

Utility application which implements content provider.Role of this
Utitlity appliation is connecting data base remotely and fetchs
information in a collection (i.e. List<Employee>  Employee is one
bean )

In content provier implementation for query method i have done
following steps.

1) Connect remote location
2)Fetch Employee list

List<Employee> listEmp = fecth information.

3) iterate listEmp and insert Employee data into cursor

4) return cusorwith Emp information.

Because of Step 3 ,My application performace become very slow.Consider
case like Data base have 1000 employes,so execution of query method
takes some time.

My Issues:
1) Insteading dumping list into cursor,Can i send List<Employee>
directly with cursor?

2) Is there any other apporach which will solve my performance issue..

Expecting some intersting replies......

Thank you very much in advance

-- 

3. HELP: Retrieve USSD Message

4. Any problem with the HTC Inspire??

5. Service shouldn't unbind after rotation.

6. developer phone restore needed

7. WebView not receiving events from some soft-keys.