Um, finish() closes and destroys the instance. There isn't a way around that, sorry.
On Fri, Aug 28, 2009 at 1:42 AM, Charles <[email protected]> wrote: > > whaoo your command give me a large report. > Do you know how to avoid the restarting of my activity B, i close it > with finish(); > > adb shell dumpsys activity : > > a ProcessRecord{438b96e8 2966:com.android.mms/10009} > class=com.android.mms.MmsApp > manageSpaceActivityName=null > dir=/system/app/Mms.apk publicDir=/system/app/Mms.apk data=/data/ > data/com.an > droid.mms > packageList=[com.android.mms] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@43523428 > curReceiver=null > pid=2966 starting=false lastPss=2527232 > maxAdj=15 hiddenAdj=7 curRawAdj=7 setRawAdj=7 curAdj=7 setAdj=7 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[ServiceRecord{4379da78 > com.android.mms/.transaction.TransactionSer > vice}] > executingServices=[] > connections=[] > pubProviders={} > conProviders=[ContentProviderRecord{435cdad0 > com.android.providers.settings. > SettingsProvider}] > receivers=[ReceiverList{437f2240 2966 com.android.mms/10009 client > 437f2010} > , ReceiverList{4354df00 2966 com.android.mms/10009 client 43576ce8}, > ReceiverLis > t{43648380 2966 com.android.mms/10009 client 43653968}] > *PERSISTENT* Process [system] UID 1000 > ProcessRecord{4364ea00 56:system/1000} > class=null > manageSpaceActivityName=null > dir=/system/framework/framework-res.apk publicDir=/system/ > framework/framewor > k-res.apk data=/data/system > packageList=[com.android.providers.subscribedfeeds, > com.google.android.serve > r.checkin, com.android.providers.settings, android] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.activitythread$applicationthr...@4353b3f0 > curReceiver=nul > l > pid=56 starting=false lastPss=0 > maxAdj=-16 hiddenAdj=11 curRawAdj=0 setRawAdj=-100 curAdj=-16 > setAdj=-100 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=true removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[ServiceRecord{436aa898 > com.google.android.server.checkin/.CheckinS > ervice}] > executingServices=[] > connections=[ConnectionRecord{436b5760 > com.android.inputmethod.latin/.LatinI > ME:@43754d48}] > pubProviders={android.content.SyncProvider=ContentProviderRecord > {435c4638 an > droid.content.SyncProvider}, > com.android.providers.settings.SettingsProvider=Con > tentProviderRecord{435cdad0 > com.android.providers.settings.SettingsProvider}, co > > m.android.providers.subscribedfeeds.GoogleSubscribedFeedsProvider=ContentProvide > rRecord{435c54b0 > com.android.providers.subscribedfeeds.GoogleSubscribedFeedsProv > ider}, > com.google.android.server.checkin.CheckinProvider=ContentProviderRecord > {4 > 35caea0 com.google.android.server.checkin.CheckinProvider}} > conProviders=[] > receivers=[ReceiverList{436212c0 56 system/1000 client 43634778}, > ReceiverLi > st{436aa3c0 56 system/1000 client 436aa290}, ReceiverList{43692900 56 > system/100 > 0 client 436927b0}, ReceiverList{436fad48 56 system/1000 client > 436fab08}, Recei > verList{43648408 56 system/1000 client 43648240}, ReceiverList > {43692f88 56 syste > m/1000 client 43692e38}, ReceiverList{43694508 56 system/1000 client > 436943c8}, > ReceiverList{436a9710 56 system/1000 client 436a9568}, ReceiverList > {436a2710 56 > system/1000 client 436a24c8}, ReceiverList{43668f90 56 system/1000 > client 43668f > 30}, ReceiverList{4363af50 56 system/1000 client 43529c80}, > ReceiverList{43736a5 > 8 56 system/1000 client 43738f80}, ReceiverList{43545498 56 system/ > 1000 client 4 > 3521950}, ReceiverList{435ef958 56 system/1000 client 434fca58}, > ReceiverList{43 > 65f198 56 system/1000 client 4365f048}, ReceiverList{4369da18 56 > system/1000 cli > ent 4369d8b8}, ReceiverList{436a0898 56 system/1000 client 436a0728}, > ReceiverLi > st{436a9120 56 system/1000 client 436a8fe0}, ReceiverList{436a6da0 56 > system/100 > 0 client 436a6c20}, ReceiverList{436519e0 56 system/1000 client > 436127b8}, Recei > verList{43521ae0 56 system/1000 client 4354f688}, ReceiverList > {4361dca0 56 syste > m/1000 client 43558c40}, ReceiverList{435f6a60 56 system/1000 client > 436283d0}, > ReceiverList{436fd6e8 56 system/1000 client 436fd548}, ReceiverList > {436a1568 56 > system/1000 client 436a13c0}, ReceiverList{43616f68 56 system/1000 > client 4362c5 > c8}, ReceiverList{43665268 56 system/1000 client 435af370}, > ReceiverList{43645e2 > 8 56 system/1000 client 43636070}, ReceiverList{435ebee8 56 system/ > 1000 client 4 > 3557788}, ReceiverList{43670468 56 system/1000 client 43670328}, > ReceiverList{43 > 6fcd70 56 system/1000 client 436fcbd0}, ReceiverList{435275b0 56 > system/1000 cli > ent 43573420}, ReceiverList{4369e730 56 system/1000 client 4369e5d0}, > ReceiverLi > st{4359f2f8 56 system/1000 client 435a45b8}, ReceiverList{435cdd38 56 > system/100 > 0 client 436269e0}, ReceiverList{4362afb8 56 system/1000 client > 43636468}, Recei > verList{43694038 56 system/1000 client 43693ef8}] > Process [com.google.process.gapps] UID 10007 > ProcessRecord{4395e1b8 3446:com.google.process.gapps/10007} > class=null > manageSpaceActivityName=null > dir=/system/app/gtalkservice.apk publicDir=/system/app/ > gtalkservice.apk data > =/data/data/com.google.android.apps.gtalkservice > packageList=[com.google.android.providers.settings, > com.google.android.apps. > gtalkservice, com.google.android.providers.gmail] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@435aa5d0 > curReceiver=null > pid=3446 starting=false lastPss=7540736 > maxAdj=15 hiddenAdj=8 curRawAdj=8 setRawAdj=8 curAdj=8 setAdj=8 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[ServiceRecord{4362bed0 > com.google.android.apps.gtalkservice/com.go > ogle.android.gtalkservice.service.GTalkService}, ServiceRecord > {4385a658 com.goog > le.android.googleapps/.GoogleLoginService}] > executingServices=[] > connections=[ConnectionRecord{43696ea0 > com.google.android.googleapps/.Google > LoginService:@436b3a00}, ConnectionRecord{4365f3d0 > com.google.android.googleapps > /.GoogleLoginService:@43691278}, ConnectionRecord{436408f8 > com.google.android.go > ogleapps/.GoogleLoginService:@4368d9b8}] > pubProviders= > {com.google.android.providers.settings.GoogleSettingsProvider=C > ontentProviderRecord{43815b48 > com.google.android.providers.settings.GoogleSettin > gsProvider}, > com.google.android.providers.gmail.MailProvider=ContentProviderReco > rd{43815648 com.google.android.providers.gmail.MailProvider}} > conProviders=[ContentProviderRecord{435c54b0 > com.android.providers.subscribe > dfeeds.GoogleSubscribedFeedsProvider}, ContentProviderRecord{435caea0 > com.google > .android.server.checkin.CheckinProvider}, ContentProviderRecord > {435cdad0 com.and > roid.providers.settings.SettingsProvider}, ContentProviderRecord > {435c4638 androi > d.content.SyncProvider}, ContentProviderRecord{435a1978 > com.android.providers.im > .ImProvider}] > receivers=[ReceiverList{436b98c0 3446 com.google.process.gapps/ > 10007 client > 436ccc80}, ReceiverList{43649d90 3446 com.google.process.gapps/10007 > client 4369 > a040}, ReceiverList{43605fb0 3446 com.google.process.gapps/10007 > client 43649c78 > }, ReceiverList{43601bf0 3446 com.google.process.gapps/10007 client > 43605698}, R > eceiverList{4363ce78 3446 com.google.process.gapps/10007 client > 43650ae8}, Recei > verList{43688f38 3446 com.google.process.gapps/10007 client 436b5158}, > ReceiverL > ist{43642158 3446 com.google.process.gapps/10007 client 437265a8}] > Process [com.google.android.apps.maps:LocationFriendService] UID > 10019 > ProcessRecord{437af960 > 3952:com.google.android.apps.maps:LocationFriendServi > ce/10019} > class=com.google.googlenav.android.AndroidGmmApplication > manageSpaceActivityName=null > dir=/data/app/com.google.android.apps.maps.apk publicDir=/data/app/ > com.googl > e.android.apps.maps.apk data=/data/data/com.google.android.apps.maps > packageList=[com.google.android.apps.maps] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@43801b40 > curReceiver=null > pid=3952 starting=false lastPss=0 > maxAdj=15 hiddenAdj=7 curRawAdj=15 setRawAdj=15 curAdj=15 > setAdj=15 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[] > executingServices=[] > connections=[] > pubProviders={} > conProviders=[ContentProviderRecord{435cdad0 > com.android.providers.settings. > SettingsProvider}] > receivers=[] > Process [com.app.geogolfpro] UID 10026 > ProcessRecord{43906f70 3790:com.app.geogolfpro/10026} > class=null > manageSpaceActivityName=null > dir=/data/app/com.app.geogolfpro.apk publicDir=/data/app/ > com.app.geogolfpro. > apk data=/data/data/com.app.geogolfpro > packageList=[com.app.geogolfpro] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@436a3ba8 > curReceiver=null > pid=3790 starting=false lastPss=0 > maxAdj=15 hiddenAdj=7 curRawAdj=15 setRawAdj=15 curAdj=15 > setAdj=15 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[] > executingServices=[] > connections=[] > pubProviders={} > conProviders=[ContentProviderRecord{435cdad0 > com.android.providers.settings. > SettingsProvider}] > receivers=[ReceiverList{437e8e00 3790 com.app.geogolfpro/10026 > client 437d53 > d8}] > Process [com.android.inputmethod.latin] UID 10004 > ProcessRecord{437b6450 316:com.android.inputmethod.latin/10004} > class=null > manageSpaceActivityName=null > dir=/system/app/LatinIME.apk publicDir=/system/app/LatinIME.apk > data=/data/d > ata/com.android.inputmethod.latin > packageList=[com.android.inputmethod.latin] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@43731f90 > curReceiver=null > pid=316 starting=false lastPss=3901440 > maxAdj=15 hiddenAdj=11 curRawAdj=1 setRawAdj=1 curAdj=1 setAdj=1 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[ServiceRecord{437cc1d8 > com.android.inputmethod.latin/.LatinIME}] > executingServices=[] > connections=[] > pubProviders={} > conProviders=[ContentProviderRecord{435cdad0 > com.android.providers.settings. > SettingsProvider}] > receivers=[ReceiverList{436a49b0 316 com.android.inputmethod.latin/ > 10004 cli > ent 4366f500}] > Process [com.app.autospeaker] UID 10031 > ProcessRecord{43923758 2959:com.app.autospeaker/10031} > class=null > manageSpaceActivityName=null > dir=/data/app/com.app.autospeaker.apk publicDir=/data/app/ > com.app.autospeake > r.apk data=/data/data/com.app.autospeaker > packageList=[com.app.autospeaker] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@4359f158 > curReceiver=null > pid=2959 starting=false lastPss=2028544 > maxAdj=15 hiddenAdj=9 curRawAdj=9 setRawAdj=9 curAdj=9 setAdj=9 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[] > services=[ServiceRecord{43771428 > com.app.autospeaker/.AutoSpeakerService}] > executingServices=[] > connections=[] > pubProviders={} > conProviders=[] > receivers=[] > Process [com.android.browser] UID 10017 > ProcessRecord{43917358 2928:com.android.browser/10017} > class=com.android.browser.Browser > manageSpaceActivityName=null > dir=/system/app/Browser.apk publicDir=/system/app/Browser.apk > data=/data/dat > a/com.android.browser > packageList=[com.android.browser] > instrumentationClass=null instrumentationProfileFile=null > instrumentationArguments=null > thread=android.app.applicationthreadpr...@436ba368 > curReceiver=null > pid=2928 starting=false lastPss=11838464 > maxAdj=15 hiddenAdj=10 curRawAdj=10 setRawAdj=10 curAdj=10 > setAdj=10 > isForeground=false setIsForeground=false foregroundServices=false > forcingToF > oreground=null > persistent=false removed=false persistentActivities=0 > debugging=false crashing=false null notResponding=false null > bad=false > activities=[HistoryRecord{438b1e28 {com.android.browser/ > com.android.browser. > BrowserActivity}}] > services=[] > executingServices=[] > connections=[] > pubProviders= > {com.android.browser.BrowserProvider=ContentProviderRecord{436b > a540 com.android.browser.BrowserProvider}} > conProviders=[ContentProviderRecord{435cdad0 > com.android.providers.settings. > SettingsProvider}] > receivers=[ReceiverList{437c1790 2928 com.android.browser/10017 > client 437c1 > 560}] > > Running processes (most recent first): > Running Norm Proc # 9: oom_adj= 15 ProcessRecord{437af960 > 3952:com.google.an > droid.apps.maps:LocationFriendService/10019} > Running Norm Proc # 8: oom_adj= 0 ProcessRecord{4368b2e0 > 97:android.process > .acore/10004} > Running Norm Proc # 7: oom_adj= 15 ProcessRecord{43906f70 > 3790:com.app.geogo > lfpro/10026} > Running Norm Proc # 6: oom_adj= 7 ProcessRecord{438b96e8 > 2966:com.android.m > ms/10009} > Running Norm Proc # 5: oom_adj= 8 ProcessRecord{4395e1b8 > 3446:com.google.pr > ocess.gapps/10007} > Running Norm Proc # 4: oom_adj= 9 ProcessRecord{43923758 > 2959:com.app.autos > peaker/10031} > Running Norm Proc # 3: oom_adj= 10 ProcessRecord{43917358 > 2928:com.android.b > rowser/10017} > Running PERS Proc # 2: oom_adj=-12 ProcessRecord{43692298 > 94:com.android.pho > ne/1001} > Running PERS Proc # 1: oom_adj=-100 ProcessRecord{4364ea00 > 56:system/1000} > Running Norm Proc # 0: oom_adj= 1 ProcessRecord{437b6450 > 316:com.android.in > putmethod.latin/10004} > > PID mappings: > PID #56: ProcessRecord{4364ea00 56:system/1000} > PID #94: ProcessRecord{43692298 94:com.android.phone/1001} > PID #97: ProcessRecord{4368b2e0 97:android.process.acore/10004} > PID #316: ProcessRecord{437b6450 316:com.android.inputmethod.latin/ > 10004} > PID #2928: ProcessRecord{43917358 2928:com.android.browser/10017} > PID #2959: ProcessRecord{43923758 2959:com.app.autospeaker/10031} > PID #2966: ProcessRecord{438b96e8 2966:com.android.mms/10009} > PID #3446: ProcessRecord{4395e1b8 3446:com.google.process.gapps/ > 10007} > PID #3790: ProcessRecord{43906f70 3790:com.app.geogolfpro/10026} > PID #3952: ProcessRecord{437af960 > 3952:com.google.android.apps.maps:Location > FriendService/10019} > > Total persistent processes: 2 > mHomeProcess: ProcessRecord{4368b2e0 97:android.process.acore/10004} > mConfiguration: { scale=1.0 imsi=208/104 locale=en_US touch=3 > key=2/1/2 nav=3 > orien=1 } > mStartRunning=true mSystemReady=true mBooting=false mBooted=true > mFactoryTest= > 0 > mSleeping=true > mGoingToSleep=WakeLock{4353c0f8 held=false, refCount=0} > mLaunchingActivity=WakeLock{4353c1b0 held=false, refCount=0} > mDebugApp=null/orig=null mDebugTransient=false > mOrigWaitForDebugger=false > mAlwaysFinishActivities=false mWatcher=null > > > > > On Aug 27, 9:12 pm, Dianne Hackborn <[email protected]> wrote: > > My guess is you are restarting the activity. Look at the log to see if > it > > says anything about starting an activity, and you can use "adb shell > dumpsys > > activity" to see the state of the activity stacks. > > > > > > > > > > > > On Thu, Aug 27, 2009 at 8:44 AM, Charles <[email protected]> wrote: > > > > > Hello, > > > > > I explain you my problem: > > > I have an application with an activity A which creates an activity B > > > (in theme dialog). > > > I push the button in my activity B to finish it, i come back on > > > activity A, it is ok. > > > Then I press the button return on my G1, i go back on my home screen. > > > And now if i do a long press on the home button, and i click on my > > > application, it is the activity B which appears ! > > > > > I finish my activity B, with this code : > > > setResult(RESULT_OK); > > > finish(); > > > > > Do you have any idea to resolve this problem? > > > > -- > > Dianne Hackborn > > Android framework engineer > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see > and > > answer them. > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

