use of android.view.WindowManagerImpl in project platform_frameworks_base by android.
the class DecorContext method getSystemService.
@Override
public Object getSystemService(String name) {
if (Context.WINDOW_SERVICE.equals(name)) {
if (mWindowManager == null) {
WindowManagerImpl wm = (WindowManagerImpl) super.getSystemService(Context.WINDOW_SERVICE);
mWindowManager = wm.createLocalWindowManager(mPhoneWindow);
}
return mWindowManager;
}
return super.getSystemService(name);
}
use of android.view.WindowManagerImpl in project platform_frameworks_base by android.
the class Presentation method createPresentationContext.
private static Context createPresentationContext(Context outerContext, Display display, int theme) {
if (outerContext == null) {
throw new IllegalArgumentException("outerContext must not be null");
}
if (display == null) {
throw new IllegalArgumentException("display must not be null");
}
Context displayContext = outerContext.createDisplayContext(display);
if (theme == 0) {
TypedValue outValue = new TypedValue();
displayContext.getTheme().resolveAttribute(com.android.internal.R.attr.presentationTheme, outValue, true);
theme = outValue.resourceId;
}
// Derive the display's window manager from the outer window manager.
// We do this because the outer window manager have some extra information
// such as the parent window, which is important if the presentation uses
// an application window type.
final WindowManagerImpl outerWindowManager = (WindowManagerImpl) outerContext.getSystemService(Context.WINDOW_SERVICE);
final WindowManagerImpl displayWindowManager = outerWindowManager.createPresentationWindowManager(displayContext);
return new ContextThemeWrapper(displayContext, theme) {
@Override
public Object getSystemService(String name) {
if (Context.WINDOW_SERVICE.equals(name)) {
return displayWindowManager;
}
return super.getSystemService(name);
}
};
}
use of android.view.WindowManagerImpl in project android_frameworks_base by ResurrectionRemix.
the class DecorContext method getSystemService.
@Override
public Object getSystemService(String name) {
if (Context.WINDOW_SERVICE.equals(name)) {
if (mWindowManager == null) {
WindowManagerImpl wm = (WindowManagerImpl) super.getSystemService(Context.WINDOW_SERVICE);
mWindowManager = wm.createLocalWindowManager(mPhoneWindow);
}
return mWindowManager;
}
return super.getSystemService(name);
}
use of android.view.WindowManagerImpl in project android_frameworks_base by AOSPA.
the class Presentation method createPresentationContext.
private static Context createPresentationContext(Context outerContext, Display display, int theme) {
if (outerContext == null) {
throw new IllegalArgumentException("outerContext must not be null");
}
if (display == null) {
throw new IllegalArgumentException("display must not be null");
}
Context displayContext = outerContext.createDisplayContext(display);
if (theme == 0) {
TypedValue outValue = new TypedValue();
displayContext.getTheme().resolveAttribute(com.android.internal.R.attr.presentationTheme, outValue, true);
theme = outValue.resourceId;
}
// Derive the display's window manager from the outer window manager.
// We do this because the outer window manager have some extra information
// such as the parent window, which is important if the presentation uses
// an application window type.
final WindowManagerImpl outerWindowManager = (WindowManagerImpl) outerContext.getSystemService(Context.WINDOW_SERVICE);
final WindowManagerImpl displayWindowManager = outerWindowManager.createPresentationWindowManager(displayContext);
return new ContextThemeWrapper(displayContext, theme) {
@Override
public Object getSystemService(String name) {
if (Context.WINDOW_SERVICE.equals(name)) {
return displayWindowManager;
}
return super.getSystemService(name);
}
};
}
use of android.view.WindowManagerImpl in project android_frameworks_base by AOSPA.
the class DecorContext method getSystemService.
@Override
public Object getSystemService(String name) {
if (Context.WINDOW_SERVICE.equals(name)) {
if (mWindowManager == null) {
WindowManagerImpl wm = (WindowManagerImpl) super.getSystemService(Context.WINDOW_SERVICE);
mWindowManager = wm.createLocalWindowManager(mPhoneWindow);
}
return mWindowManager;
}
return super.getSystemService(name);
}
Aggregations