Skip to content

Instantly share code, notes, and snippets.

@BramYeh
Last active August 9, 2018 14:14
Show Gist options
  • Save BramYeh/e549d42826908cb8cbbaff4098ded247 to your computer and use it in GitHub Desktop.
Save BramYeh/e549d42826908cb8cbbaff4098ded247 to your computer and use it in GitHub Desktop.
Obfuscated Code of YouTubePlayerFragment at YoutubeAndroidPlayerApi-v1.2.2.jar
package com.google.android.youtube.player;
public class YouTubePlayerFragment extends Fragment implements Provider {
private final YouTubePlayerFragment.a a = new YouTubePlayerFragment.a((byte)0);
private Bundle b;
private YouTubePlayerView c;
private String d;
private OnInitializedListener e;
private boolean f;
public static YouTubePlayerFragment newInstance() {
return new YouTubePlayerFragment();
}
public YouTubePlayerFragment() {
}
public void initialize(String var1, OnInitializedListener var2) {
this.d = ab.a(var1, "Developer key cannot be null or empty");
this.e = var2;
this.a();
}
private void a() {
if (this.c != null && this.e != null) {
this.c.a(this.f);
this.c.a(this.getActivity(), this, this.d, this.e, this.b);
this.b = null;
this.e = null;
}
}
public void onCreate(Bundle var1) {
super.onCreate(var1);
this.b = var1 != null ? var1.getBundle("YouTubePlayerFragment.KEY_PLAYER_VIEW_STATE") : null;
}
public View onCreateView(LayoutInflater var1, ViewGroup var2, Bundle var3) {
this.c = new YouTubePlayerView(this.getActivity(), (AttributeSet)null, 0, this.a);
this.a();
return this.c;
}
public void onStart() {
super.onStart();
this.c.a();
}
public void onResume() {
super.onResume();
this.c.b();
}
public void onPause() {
this.c.c();
super.onPause();
}
public void onSaveInstanceState(Bundle var1) {
super.onSaveInstanceState(var1);
Bundle var2 = this.c != null ? this.c.e() : this.b;
var1.putBundle("YouTubePlayerFragment.KEY_PLAYER_VIEW_STATE", var2);
}
public void onStop() {
this.c.d();
super.onStop();
}
public void onDestroyView() {
this.c.c(this.getActivity().isFinishing());
this.c = null;
super.onDestroyView();
}
public void onDestroy() {
if (this.c != null) {
Activity var1 = this.getActivity();
this.c.b(var1 == null || var1.isFinishing());
}
super.onDestroy();
}
private final class a implements b {
private a() {
}
public final void a(YouTubePlayerView var1, String var2, OnInitializedListener var3) {
YouTubePlayerFragment.this.initialize(var2, YouTubePlayerFragment.this.e);
}
public final void a(YouTubePlayerView var1) {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment