Esempio n. 1
0
 public static android.view.WindowManager getDefault(android.content.res.CompatibilityInfo
                                                     compatInfo)
 {
     android.view.CompatibilityInfoHolder cih = new android.view.CompatibilityInfoHolder
                                                    ();
     cih.set(compatInfo);
     if (cih.getIfNeeded() == null)
     {
         return(sWindowManager);
     }
     lock (sLock)
     {
         // NOTE: It would be cleaner to move the implementation of
         // WindowManagerImpl into a static inner class, and have this
         // public impl just call into that.  Then we can make multiple
         // instances of WindowManagerImpl for compat mode rather than
         // having to make wrappers.
         android.view.WindowManager wm = sCompatWindowManagers.get(compatInfo);
         if (wm == null)
         {
             wm = new android.view.WindowManagerImpl.CompatModeWrapper(sWindowManager, cih);
             sCompatWindowManagers.put(compatInfo, wm);
         }
         return(wm);
     }
 }
Esempio n. 2
0
		public static android.view.WindowManager getDefault(android.content.res.CompatibilityInfo
			 compatInfo)
		{
			android.view.CompatibilityInfoHolder cih = new android.view.CompatibilityInfoHolder
				();
			cih.set(compatInfo);
			if (cih.getIfNeeded() == null)
			{
				return sWindowManager;
			}
			lock (sLock)
			{
				// NOTE: It would be cleaner to move the implementation of
				// WindowManagerImpl into a static inner class, and have this
				// public impl just call into that.  Then we can make multiple
				// instances of WindowManagerImpl for compat mode rather than
				// having to make wrappers.
				android.view.WindowManager wm = sCompatWindowManagers.get(compatInfo);
				if (wm == null)
				{
					wm = new android.view.WindowManagerImpl.CompatModeWrapper(sWindowManager, cih);
					sCompatWindowManagers.put(compatInfo, wm);
				}
				return wm;
			}
		}