package com.tencent.mm.plugin.appbrand.game.page;

import android.graphics.Bitmap;
import android.graphics.Matrix;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.game.page.WAGamePageViewContainerLayout.a;
import com.tencent.mm.plugin.appbrand.game.page.WAGamePageViewContainerLayout.b;
import com.tencent.mm.sdk.platformtools.ab;

class f$5 implements a {
    final /* synthetic */ f hsW;

    f$5(f fVar) {
        this.hsW = fVar;
    }

    public final void a(b bVar, b bVar2) {
        AppMethodBeat.i(130244);
        ab.v("AppBrandGame.WAGamePageView", "hy: after change. old direction:%s, new direction: %s", new Object[]{bVar, bVar2});
        if (f.d(this.hsW) == null) {
            ab.e("AppBrandGame.WAGamePageView", "hy: screenshot is null");
            AppMethodBeat.o(130244);
        } else if ((f.a(bVar) && f.a(bVar2)) || (f.b(bVar) && f.b(bVar2))) {
            AppMethodBeat.o(130244);
        } else if (f.a(bVar2)) {
            Matrix matrix = new Matrix();
            if ((bVar2 == b.htb && bVar == b.htc) || (bVar2 == b.htd && bVar == b.hte)) {
                matrix.postRotate(90.0f);
            } else {
                matrix.postRotate(270.0f);
            }
            f.e(this.hsW).setVisibility(0);
            f.e(this.hsW).setImageBitmap(Bitmap.createBitmap(f.d(this.hsW), 0, 0, f.d(this.hsW).getWidth(), f.d(this.hsW).getHeight(), matrix, true));
            f.f(this.hsW);
            AppMethodBeat.o(130244);
        } else {
            f.g(this.hsW);
            f.a(this.hsW).setOnConfigurationChangedListener(null);
            AppMethodBeat.o(130244);
        }
    }
}
