Java源码示例:org.telegram.messenger.BringAppForegroundService
示例1
public void exitFromPip() {
if (webView == null || pipVideoView == null) {
return;
}
if (ApplicationLoader.mainInterfacePaused) {
try {
parentActivity.startService(new Intent(ApplicationLoader.applicationContext, BringAppForegroundService.class));
} catch (Throwable e) {
FileLog.e(e);
}
}
if (isYouTube) {
runJsCode("showControls();");
}
ViewGroup parent = (ViewGroup) webView.getParent();
if (parent != null) {
parent.removeView(webView);
}
containerLayout.addView(webView, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 48 + 36 + (hasDescription ? 22 : 0)));
setShowWithoutAnimation(true);
show();
pipVideoView.close();
pipVideoView = null;
}
示例2
public void exitFromPip() {
if (webView == null || pipVideoView == null) {
return;
}
if (ApplicationLoader.mainInterfacePaused) {
try {
parentActivity.startService(new Intent(ApplicationLoader.applicationContext, BringAppForegroundService.class));
} catch (Throwable e) {
FileLog.e(e);
}
}
if (isYouTube) {
runJsCode("showControls();");
}
ViewGroup parent = (ViewGroup) webView.getParent();
if (parent != null) {
parent.removeView(webView);
}
containerLayout.addView(webView, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 48 + 36 + (hasDescription ? 22 : 0)));
setShowWithoutAnimation(true);
show();
pipVideoView.close();
pipVideoView = null;
}
示例3
public void exitFromPip() {
if (webView == null || pipVideoView == null) {
return;
}
if (ApplicationLoader.mainInterfacePaused) {
try {
parentActivity.startService(new Intent(ApplicationLoader.applicationContext, BringAppForegroundService.class));
} catch (Throwable e) {
FileLog.e(e);
}
}
if (isYouTube) {
runJsCode("showControls();");
}
ViewGroup parent = (ViewGroup) webView.getParent();
if (parent != null) {
parent.removeView(webView);
}
containerLayout.addView(webView, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 48 + 36 + (hasDescription ? 22 : 0)));
setShowWithoutAnimation(true);
show();
pipVideoView.close();
pipVideoView = null;
}
示例4
public void exitFromPip() {
if (webView == null || pipVideoView == null) {
return;
}
if (ApplicationLoader.mainInterfacePaused) {
try {
parentActivity.startService(new Intent(ApplicationLoader.applicationContext, BringAppForegroundService.class));
} catch (Throwable e) {
FileLog.e(e);
}
}
if (isYouTube) {
runJsCode("showControls();");
}
ViewGroup parent = (ViewGroup) webView.getParent();
if (parent != null) {
parent.removeView(webView);
}
containerLayout.addView(webView, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 48 + 36 + (hasDescription ? 22 : 0)));
setShowWithoutAnimation(true);
show();
pipVideoView.close();
pipVideoView = null;
}