// Path: app/src/main/java/com/ge/protein/data/model/User.java
// @AutoValue
// public abstract class User implements Parcelable {
// 
//     public abstract long id();
// 
//     public abstract String name();
// 
//     public abstract String username();
// 
//     public abstract String html_url();
// 
//     public abstract String avatar_url();
// 
//     public abstract String bio();
// 
//     @Nullable
//     public abstract String location();
// 
//     public abstract Links links();
// 
//     public abstract long buckets_count();
// 
//     public abstract long comments_received_count();
// 
//     public abstract long followers_count();
// 
//     public abstract long followings_count();
// 
//     public abstract long likes_count();
// 
//     public abstract long likes_received_count();
// 
//     public abstract long projects_count();
// 
//     public abstract long rebounds_received_count();
// 
//     public abstract long shots_count();
// 
//     public abstract long teams_count();
// 
//     public abstract boolean can_upload_shot();
// 
//     public abstract String type();
// 
//     public abstract boolean pro();
// 
//     public abstract String buckets_url();
// 
//     public abstract String followers_url();
// 
//     public abstract String following_url();
// 
//     public abstract String likes_url();
// 
//     public abstract String shots_url();
// 
//     @Nullable
//     public abstract String teams_url();
// 
//     public abstract String created_at();
// 
//     public abstract String updated_at();
// 
//     public static TypeAdapter<User> typeAdapter(Gson gson) {
//         return new AutoValue_User.GsonTypeAdapter(gson).nullSafe();
//     }
// }
// 
// Path: app/src/open/java/com/ge/protein/firebase/FirebaseCrashUtils.java
// public class FirebaseCrashUtils {
// 
//     public static void log(String message) {
//         // no-op for product flavor open
//     }
// }
// 
// Path: app/src/main/java/com/ge/protein/ui/activity/BaseProteinActivity.java
// public abstract class BaseProteinActivity extends RxAppCompatActivity {
// 
//     protected boolean login;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         login = AccountManager.getInstance().isLogin();
//     }
// 
// }


import android.os.Bundle;
import android.support.annotation.Nullable;
import com.ge.protein.R;
import com.ge.protein.data.model.User;
import com.ge.protein.firebase.FirebaseCrashUtils;
import com.ge.protein.ui.activity.BaseProteinActivity;
/*
 * Copyright 2017 Jiaheng Ge
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ge.protein.user;



public class UserActivity extends BaseProteinActivity {

    public static final String EXTRA_USER = "extra_user";

    private User user;
    private UserPresenter userPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FirebaseCrashUtils.log("UserActivity created");

        user = getIntent().getParcelableExtra(EXTRA_USER);
        setContentView(R.layout.activity_user);

        userPresenter = new UserPresenter((UserView)findViewById(R.id.user_view), user);
        if (savedInstanceState != null) {
            userPresenter.onRestoreInstanceState(savedInstanceState);
        }
// Path: app/src/main/java/com/ge/protein/data/model/User.java
// @AutoValue
// public abstract class User implements Parcelable {
// 
//     public abstract long id();
// 
//     public abstract String name();
// 
//     public abstract String username();
// 
//     public abstract String html_url();
// 
//     public abstract String avatar_url();
// 
//     public abstract String bio();
// 
//     @Nullable
//     public abstract String location();
// 
//     public abstract Links links();
// 
//     public abstract long buckets_count();
// 
//     public abstract long comments_received_count();
// 
//     public abstract long followers_count();
// 
//     public abstract long followings_count();
// 
//     public abstract long likes_count();
// 
//     public abstract long likes_received_count();
// 
//     public abstract long projects_count();
// 
//     public abstract long rebounds_received_count();
// 
//     public abstract long shots_count();
// 
//     public abstract long teams_count();
// 
//     public abstract boolean can_upload_shot();
// 
//     public abstract String type();
// 
//     public abstract boolean pro();
// 
//     public abstract String buckets_url();
// 
//     public abstract String followers_url();
// 
//     public abstract String following_url();
// 
//     public abstract String likes_url();
// 
//     public abstract String shots_url();
// 
//     @Nullable
//     public abstract String teams_url();
// 
//     public abstract String created_at();
// 
//     public abstract String updated_at();
// 
//     public static TypeAdapter<User> typeAdapter(Gson gson) {
//         return new AutoValue_User.GsonTypeAdapter(gson).nullSafe();
//     }
// }
// 
// Path: app/src/open/java/com/ge/protein/firebase/FirebaseCrashUtils.java
// public class FirebaseCrashUtils {
// 
//     public static void log(String message) {
//         // no-op for product flavor open
//     }
// }
// 
// Path: app/src/main/java/com/ge/protein/ui/activity/BaseProteinActivity.java
// public abstract class BaseProteinActivity extends RxAppCompatActivity {
// 
//     protected boolean login;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         login = AccountManager.getInstance().isLogin();
//     }
// 
// }


// Path: app/src/main/java/com/ge/protein/user/UserActivity.java
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.ge.protein.R;
import com.ge.protein.data.model.User;
import com.ge.protein.firebase.FirebaseCrashUtils;
import com.ge.protein.ui.activity.BaseProteinActivity;

/*
 * Copyright 2017 Jiaheng Ge
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ge.protein.user;



public class UserActivity extends BaseProteinActivity {

    public static final String EXTRA_USER = "extra_user";

    private User user;
    private UserPresenter userPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FirebaseCrashUtils.log("UserActivity created");

        user = getIntent().getParcelableExtra(EXTRA_USER);
        setContentView(R.layout.activity_user);

        userPresenter = new UserPresenter((UserView)findViewById(R.id.user_view), user);
        if (savedInstanceState != null) {
            userPresenter.onRestoreInstanceState(savedInstanceState);
        }
        userPresenter.start();