Some questions about ApiDemo.java

by david » Fri, 09 May 2008 14:42:37 GMT


Sponsored Links
 1. Basically the ApiDemo activity just calls itself recursively, is it
counter-intuitive to efficient running on mobile device?

2. The following code in getData():
        PackageManager pm = getPackageManager();
        List<ResolveInfo> list = pm.queryIntentActivities(mainIntent,
0);

        if (null == list)
            return myData;
...
Can it be moved to somewhere for efficency purpose? Since it gets
called again and again but just gets same results.

3. Consider the code in getDate():
        Map<String, Boolean> entries = new HashMap<String, Boolean>();
...
Why use Hashmap? isn't it overskilled?

Again, since it is the demo code provided by Google, I think it is
worthy to study it in detail.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. (WTA) overclock SGS

Dear friends....klo SGS overclock 1,25 Ghz masih aman ga ya?....masih stock
rom,hanya root n instal lagfix + tegrak overclock buat
overclock.....thanks..

-- 
===============

2. problem in porting android

hi all ..

i have embest-at91sa9g45 board "http://www.embedinfo.com/en/list.asp?
id=72",
 and i want to port android on it , so i used demo-prebuild images on
anroid4sam site "http://www.at91.com/android4sam/bin/view/Android4SAM/
GettingStarted" for nandflash.

but the problem there no any response appear on the touchscreen
"black"

please any help or guide me to the correct way as i beginner :)

here is the output from hyper :
U-Boot 1.3.4 (Oct 15 2010 - 18:31:36)nd : 2 --- status :
0)

DRAM:  128 MB
NAND:  256 MiBTE arguments :
In:    serial000, buffer a
Out:   serialof 0x20000 By
Err:   serial
Hit any key to stop autoboot:  0
-I- W
-
-I- WRITE

NAND read: device 0 offset 0x200000, size
0x1fe590
-I-
-
-I-
 2090384 bytes read: OKd : 2 --- status : 0)
## Booting kernel from Legacy Image at 72200000 ... WRITE arguments :
offset 0x1b80000, buffer at 0x70
   Image Name:   Linux-2.6.30
   Image Type:   ARM Linux Kernel Image (uncompressed)t block 0xdc,
page 0x0, offset in page 0x0
   Data Size:    2090320 Bytes =  2 MBI-
-I-     End of applet (command : 2
   Load Address: 70008000
-
   Entry Point:  70008000rguments : offset 0x1ba00
   Verifying Checksum ...
-
-I- WRITE at block 0xde, page 0x0, offset in page 0x0
 booting the kernel.
Linux version 2.6.30 (bshen@bamboo) (gcc version 4.2.0 20070413
(prerelease) (Co
-
-I- WRITE arguments : offset 0x1be0000, buffer at 0x70003
deSourcery Sourcery G++ Lite 2007q1-10)) #7 PREEMPT Fri Oct 15
18:10:27 CST 2010
-I-
-I- WRITE at block 0xdf, page 0x0, offset in page 0x0

CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177plet
(command : 2 --- status : 0)
CPU: VIVT data cache, VIVT instruction cacheoffset 0x1c00000,
buf
-
-I-     End of a
Kernel command line: mem=128M console=ttyS0,115200 root=/dev/mtdblock1
rw rootfs
-
-I- WRITE arguments : offset 0x1c40000, buffer at 0x70003aa0, of
0x20000 Byt
type=jffs2 init=/init rootdelay=1
NR_IRQS:192-
-I- WRITE
AT91: 160 gpio irqs in 5 bankst in page 0x0
PID hash table entries: 512 (order: 9, 2048 bytes) applet (command : 2
--- status : 0)
Console: colour dummy device 80x30-
-I- WRITE arguments : offset 0x1
console [ttyS0] enabled
CPU: Testing write buffer coherency:
ok
net_namespace: 296 bytes
-I- WRITE at block 0xe5
NET: Registered protocol family 16
AT91: Power ManagementEnd of applet (command
AT91: Starting after power-restored wakeup
-I-
-I- WRITE argu
atmel_tcb: probe of atmel_tcb.0 fail
usbcore: registered new device driver usb:  128 MB
NAND
-
-I- WRITE a
NET: Registered protocol family 2page 0x0   serial
Er
IP route cache hash table entries: 1024 (order: 0, 4096 bytes) ---
status : 0)on...
macb0:
TCP established hash table entries: 4096 (order: 3, 32768 bytes), of
0x20000 Bytes
macb0: link down (status: 0x7849)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)page 0x0,
offset in page 0x0

NAND read: device 0
TCP: Hash tables configured (established 4096 bind 4096) 2 ---
status : 0)
 1997148 bytes read: OK
TCP reno registeredTE arguments : offs
NET: Registered protocol famil
-
-
io scheduler noop registered : 2 --- status : 0)essing L
io scheduler anticipatory registered (default)WRITE arguments : offset
0x1d60000, buffer at
atmel_lcdfb atmel_lcdfb.0: 1020KiB frame buffer at 77a00000 (mapped at
ff600000).....................
-I-
-I- WRITE at block 0xeb, page 0x0, offset in page 0x0

... ops, no vsync detected? ...
-I- WRITE a
-I-
-I-     End
Console: switching to colour frame buffer device 60x34ver) (gcc
version 4.2.0 200704
-I-
-I- WRITE arguments
... ops, no vsync detected? ...
-I-     End of applet (command : 2 --- status : 0)aa0
t)
N
AT91 NAND: 8-bit, Software ECC gpio irqs
-I- WRITE argument
Scanning device for bad blocks 0x70003aa0, of 0x20000 Bytes
Bad eraseblock 47 at 0x0000005e0000
Console:
Bad eraseblock 1733 at 0x00000d8a0000x0, offset in page 0x0console
[ttyS0]
Bad eraseblock 1769 at 0x00000dd20000
-I-     End of applet (command : 2 -
Bad eraseblock 1991 at 0x00000f8e0000
-
-I- WRITE
Creating 5 MTD partitions on "atmel_nand":0003aa0, of 0x20000 Bytes0,
offset in page
0x000000000000-0x000000500000 : "Bootstrap"emory: 128MB
-I-
-I- WRITE at block 0xf1,
0x000000500000-0x000006400000 : "ramdisk"6K code, 676K data, 136K
init, 0K h
-I-
-
0x000006400000-0x00000a400000 : "userdata"s : 0) of 0x20000
Bytes
Calibratin
0x00000a400000-0x00000e000000 : "cache"set 0x1e40000, buf

at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
0x1ec0000, buffer at 0x70003aa0, of 0x20000 Bytesommand : 2 --- s
at91_ohci at91_ohci: irq 22, io mem 0x00700000
-
-I- WRITE at block 0xf6, page
usb usb2: configuration #1 chosen from 1
choice
-
-I-     End of app
hub 2-0:1.0: USB hub found : 0)WRITE at block 0x31,
hub 2-0:1.0: 2 ports detected-I- WRITE arguments : offset
Initializing USB Mass Storage driver...000 Bytesmand : 2 --- status :
0)
usbcore: registered new interface driver usb-storageWRITE at block
0xf7, page 0x0, offset in page 0x0a0,
USB Mass Storage support registered.
msgm
-I-     End of applet
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at
c886a000-I- WRITE arguments : offset 0x1f00000, buf

usb_ep_autoconfig for fsg bulk_out got ep2-
-I- WRITE at block 0xf9, page 0x0, offse
android_usb gadget: Number of LUNs=1
-I- WRI
-I-
adb_function_addcommand : 2 ---
usb_ep_autoconfig for adb ep_in got ep3S0 at MMIO 0xfeffee00
-I- WRITE argumen
usb_ep_autoconfig for adb ep_out got ep4a0, of 0x20000 Bytes0, offset
in page 0x
android_usb gadget: android_usb readyirq = 8) is a AT
-I-
-I- WRITE at blo
mice: PS/2 mouse device common for all mice
brd: module loaded
-I- WR
input: gpio-keys as /devices/platform/gpio-keys/input/input00000
Bytesce at 0xc8878000 (irq 17)
-I-
-I- WRITE argume
atmel_tsadcc atmel_tsadcc: Master c

atmel_isi atmel_isi: Atmel ISI V4L2 device at 0xfffb4000I- WRITE at
block 0xff, page 0x0, offset in page 0x00 :
ac ===0
battery===0
Registered led device: d8 applet (command : 2 ---
Registered led device: d6
Registered led device: d7ents : offset 0x2000000,
at_hdmac at_hdmac: Atmel AHB DMA Controller ( cpy slave ), 8
channels'Enhanced' Host Controller (EHCI) Driver
-I-
-I- WRITE at block 0x1
usbcore: registered new interface driver usbhidhci: Atmel EHCI UHP
HS
-I-
-
-I-
usbhid: v2.6:USB HID core driveratus : 0) USB bus registered, as
logger: created 64K log 'log_main'TE arguments : offset 0x2020000, b
logger: created 256K
-I-     End
 removing mixer.nd : 2 --- statu
atmel_ac97c: probe of atmel_ac97c.0 failed with error -5-I- WRITE
arguments : offset 0x2060000, buffer at 0x7000
ALSA device list:ytes
  No soundcards found.
at91_oh
TCP cubic registered-I- WRITE at block 0
atmel_mci atmel_mci.0: Using dma0chan0 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 11, 1
slots
atmel_mci atmel_mci.1: Using dma0chan1 for DMA transfers
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1
slots
Waiting 1sec before mounting root device...
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 148K
Warning: unable to open an initial console.
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
block 422 is bad
block 458 is bad
yaffs_read_super: isCheckpointed 0
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
sh: can't access tty; job control turned off
# enabling adb
adb_open
warning: `zygote' uses 32-bit capabilities (legacy support in use)

-- 

3. HTC Desire ga bisa install custom ROM DHD

4. Galaxi Mini Vs Galaxi 5

5. Unable to detect phone call/dial capabilities on tablet

6. Cara cepat menyembunyikan foto & video di garmin asus a10

7. WT Sha Ganti dari Sulastri ke Inulsat