Exemplo n.º 1
0
 // func doesn't allow null...  does it matter if we clear them?
 //view.setLayoutParams(null);
 public virtual void closeAll(android.os.IBinder token, string who, string what)
 {
     lock (this)
     {
         if (mViews == null)
         {
             return;
         }
         int count = mViews.Length;
         {
             //Log.i("foo", "Closing all windows of " + token);
             for (int i = 0; i < count; i++)
             {
                 //Log.i("foo", "@ " + i + " token " + mParams[i].token
                 //        + " view " + mRoots[i].getView());
                 if (token == null || mParams[i].token == token)
                 {
                     android.view.ViewRootImpl root = mRoots[i];
                     root.mAddNesting = 1;
                     //Log.i("foo", "Force closing " + root);
                     if (who != null)
                     {
                         android.view.WindowLeaked leak = new android.view.WindowLeaked(what + " " + who +
                                                                                        " has leaked window " + root.getView() + " that was originally added here");
                         XobotOS.Runtime.Util.SetStackTrace(leak, root.getLocation().StackTrace);
                         android.util.Log.e("WindowManager", leak.Message, leak);
                     }
                     removeViewLocked(i);
                     i--;
                     count--;
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
		// func doesn't allow null...  does it matter if we clear them?
		//view.setLayoutParams(null);
		public virtual void closeAll(android.os.IBinder token, string who, string what)
		{
			lock (this)
			{
				if (mViews == null)
				{
					return;
				}
				int count = mViews.Length;
				{
					//Log.i("foo", "Closing all windows of " + token);
					for (int i = 0; i < count; i++)
					{
						//Log.i("foo", "@ " + i + " token " + mParams[i].token
						//        + " view " + mRoots[i].getView());
						if (token == null || mParams[i].token == token)
						{
							android.view.ViewRootImpl root = mRoots[i];
							root.mAddNesting = 1;
							//Log.i("foo", "Force closing " + root);
							if (who != null)
							{
								android.view.WindowLeaked leak = new android.view.WindowLeaked(what + " " + who +
									 " has leaked window " + root.getView() + " that was originally added here");
								XobotOS.Runtime.Util.SetStackTrace(leak, root.getLocation().StackTrace);
								android.util.Log.e("WindowManager", leak.Message, leak);
							}
							removeViewLocked(i);
							i--;
							count--;
						}
					}
				}
			}
		}