Skip to content

Instantly share code, notes, and snippets.

@BramYeh
Last active August 9, 2018 14:12
Show Gist options
  • Save BramYeh/e77c2ffeff77d19bfb1b526a2747e96c to your computer and use it in GitHub Desktop.
Save BramYeh/e77c2ffeff77d19bfb1b526a2747e96c to your computer and use it in GitHub Desktop.
Obfuscated Code of YouTubePlayerView at YoutubeAndroidPlayerApi-v1.2.2.jar
package com.google.android.youtube.player;
public final class YouTubePlayerView extends ViewGroup implements Provider {
private final YouTubePlayerView.b c;
private com.google.android.youtube.player.internal.b d;
private View f;
private Provider h;
private Bundle i;
....
public YouTubePlayerView(Context var1) {
this(var1, (AttributeSet)null);
}
public YouTubePlayerView(Context var1, AttributeSet var2) {
this(var1, var2, 0);
}
public YouTubePlayerView(Context var1, AttributeSet var2, int var3) {
if (!(var1 instanceof YouTubeBaseActivity)) {
throw new IllegalStateException("A YouTubePlayerView can only be created with an Activity which extends YouTubeBaseActivity as its context.");
} else {
this(var1, var2, var3, ((YouTubeBaseActivity)var1).a());
}
}
YouTubePlayerView(Context var1, AttributeSet var2, int var3, YouTubePlayerView.b var4) {
super((Context)ab.a(var1, "context cannot be null"), var2, var3);
this.c = (YouTubePlayerView.b)ab.a(var4, "listener cannot be null");
if (this.getBackground() == null) {
this.setBackgroundColor(-16777216);
}
....
}
public final void initialize(String var1, OnInitializedListener var2) {
ab.a(var1, "Developer key cannot be null or empty");
this.c.a(this, var1, var2);
}
final void a(final Activity var1, Provider var2, String var3, OnInitializedListener var4, Bundle var5) {
if (this.e == null && this.j == null) {
ab.a(var1, "activity cannot be null");
this.h = (Provider)ab.a(var2, "provider cannot be null");
this.j = (OnInitializedListener)ab.a(var4, "listener cannot be null");
this.i = var5;
this.g.b();
this.d = aa.a().a(this.getContext(), var3, new com.google.android.youtube.player.internal.t.a() {
....
}, new com.google.android.youtube.player.internal.t.b() {
....
});
this.d.e();
}
}
private void a(YouTubeInitializationResult var1) {
this.e = null;
this.g.c();
if (this.j != null) {
this.j.onInitializationFailure(this.h, var1);
this.j = null;
}
}
final void a() {
if (this.e != null) {
this.e.b();
}
}
final void b() {
if (this.e != null) {
this.e.c();
}
}
final void c() {
if (this.e != null) {
this.e.d();
}
}
final void d() {
if (this.e != null) {
this.e.e();
}
}
final void b(boolean var1) {
if (this.e != null) {
this.e.b(var1);
this.c(var1);
}
}
final void c(boolean var1) {
this.l = true;
if (this.e != null) {
this.e.a(var1);
}
}
final Bundle e() {
return this.e == null ? this.i : this.e.h();
}
interface b {
void a(YouTubePlayerView var1, String var2, OnInitializedListener var3);
void a(YouTubePlayerView var1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment