Activity has leaked window com. Android. Internal. Policy. impl. phonewindow $ decorview

Source: Internet
Author: User

Today, the program tested a bug on happy phone:

When you exit the program from the page, you cannot exit the program for the first time. You only need to release the program for the second time.

Two errors are reported during the ddms tracking:

13:51:18 08-19. 286: Error/androidruntime (5765): Java. lang. securityexception: Permission Denial: Starting intent {act = android. intent. action. main cat = [android. intent. category. home] flg = 0x10000000 CMP = com. android. launcher /. launcher}
From processrecord {302a32c0 5765: COM. up591.android/10087}
(Pid = 5765, uid = 10087) requires Android. Permission. reorder_tasks
08-19 14:16:04. 576: Error/androidruntime (6302): Java. Lang. securityexception:
Permission Denial: Starting intent {act = Android. Intent. Action. Main cat = [Android. Intent. Category. Home]
Flg = 0x10000000 CMP = com. Android. launcher/. launcher} from processrecord {2ffee120 6302: COM. up591.android/10087}
(Pid = 6302, uid = 10087) requires Android. Permission. reorder_tasks

And

08-19 14:17:13. 446: Error/windowmanager (6428): Activity com. up591.android. View. mainactivity has leaked
Window com. Android. Internal. Policy. impl. phonewindow $ decorview @ 2fd590c8 that was originally added here
08-19 14:17:13. 446: Error/windowmanager (6428): Android. View. windowleaked: Activity com. up591.android. View.
Mainactivity has leaked window com. Android. Internal. Policy. impl. phonewindow $ decorview @ 2fd590c8 that
Was originally added here
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. View. viewroot. <init> (viewroot. Java: 247)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. View. windowmanagerimpl. addview (windowmanagerimpl. Java: 148)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. View. windowmanagerimpl. addview (windowmanagerimpl. Java: 91)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. View. Window $ localwindowmanager. addview (window. Java: 444)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. Dialog. Show (dialog. Java: 248)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. asynctasks. networktask. onpreexecute (networktask. Java: 51)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. asynctasks. getrootcatalogtask. onpreexecute (getrootcatalogtask. Java: 38)
08-19 14:17:13. 446: Error/windowmanager (6428): At android. OS .asynctask.exe cute (asynctask. Java: 391)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. View. practiseactivity. getlist (practiseactivity. Java: 221)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. View. practiseactivity. onaftercreate (practiseactivity. Java: 79)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. Common. baseactivity. oncreate (baseactivity. Java: 122)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. instrumentation. callactivityoncreate (instrumentation. Java: 1047)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. receivmlaunchactivity (activitythread. Java: 2658)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. startactivitynow (activitythread. Java: 2534)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. localactivitymanager. movetostate (localactivitymanager. Java: 127)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. localactivitymanager. startactivity (localactivitymanager. Java: 339)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. widget. tabhost $ intentcontentstrategy. getcontentview (tabhost. Java: 692)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. widget. tabhost. setcurrenttab (tabhost. Java: 354)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. widget. tabhost. addtab (tabhost. Java: 230)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. up591.android. View. mainactivity. oncreate (mainactivity. Java: 51)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. instrumentation. callactivityoncreate (instrumentation. Java: 1047)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. receivmlaunchactivity (activitythread. Java: 2658)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. handlelaunchactivity (activitythread. Java: 2710)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. Access $2300 (activitythread. Java: 131)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread $ H. handlemessage (activitythread. Java: 2049)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. OS. handler. dispatchmessage (handler. Java: 99)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. OS. Looper. Loop (lomanager. Java: 123)
08-19 14:17:13. 446: Error/windowmanager (6428): at Android. App. activitythread. Main (activitythread. Java: 4737)
08-19 14:17:13. 446: Error/windowmanager (6428): At java. Lang. Reflect. method. invokenative (native method)
08-19 14:17:13. 446: Error/windowmanager (6428): At java. Lang. Reflect. method. Invoke (method. Java: 521)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. Android. Internal. OS. zygoteinit $ methodandargscaller. Run (zygoteinit. Java: 876)
08-19 14:17:13. 446: Error/windowmanager (6428): At com. Android. Internal. OS. zygoteinit. Main (zygoteinit. Java: 634)
08-19 14:17:13. 446: Error/windowmanager (6428): At Dalvik. system. nativestart. Main (native method)

The first is that the system has no permission to change the Z axis Task Arrangement.

The second is a form leakage error.

After Google found out. The reason for the form leakage is that some dialog or processdialog. The activities attached to these spaces are closed and these controls are still running. This causes bugs.

In typical cases, both the activity and the dialog display require dialog. Dismiss () before the activity. Finish (). If the direct finish () operation fails, the function is not affected.

The solution is to add the permission Android. Permission. reorder_tasks.

At present, we do not know whether the lephone cannot release page resources because it has no permissions. Further research is required

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.