content: package androidx.appcompat.app;
  
  import android.app.ActionBar;
  import android.app.Activity;
  import android.content.res.TypedArray;
  import android.graphics.drawable.Drawable;
  import android.os.Build;
  import android.util.Log;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import java.lang.reflect.Method;
  
  class ActionBarDrawerToggleHoneycomb {
      private static final String TAG = "ActionBarDrawerToggleHC";
      private static final int[] THEME_ATTRS = {16843531};
  
      static class SetIndicatorInfo {
          public Method setHomeActionContentDescription;
          public Method setHomeAsUpIndicator;
          public ImageView upIndicatorView;
  
          SetIndicatorInfo(Activity activity) {
              try {
                  this.setHomeAsUpIndicator = ActionBar.class.getDeclaredMethod("setHomeAsUpIndicator", new Class[]{Drawable.class});
                  this.setHomeActionContentDescription = ActionBar.class.getDeclaredMethod("setHomeActionContentDescription", new Class[]{Integer.TYPE});
              } catch (NoSuchMethodException e) {
                  View findViewById = activity.findViewById(16908332);
                  if (findViewById != null) {
                      ViewGroup viewGroup = (ViewGroup) findViewById.getParent();
                      if (viewGroup.getChildCount() == 2) {
                          View childAt = viewGroup.getChildAt(0);
                          View childAt2 = childAt.getId() == 16908332 ? viewGroup.getChildAt(1) : childAt;
                          if (childAt2 instanceof ImageView) {
                              this.upIndicatorView = (ImageView) childAt2;
                          }
                      }
                  }
              }
          }
      }
  
      private ActionBarDrawerToggleHoneycomb() {
      }
  
      public static Drawable getThemeUpIndicator(Activity activity) {
          TypedArray obtainStyledAttributes = activity.obtainStyledAttributes(THEME_ATTRS);
          Drawable drawable = obtainStyledAttributes.getDrawable(0);
          obtainStyledAttributes.recycle();
          return drawable;
      }
  
      public static SetIndicatorInfo setActionBarDescription(SetIndicatorInfo info, Activity activity, int contentDescRes) {
          if (info == null) {
              info = new SetIndicatorInfo(activity);
          }
          if (info.setHomeAsUpIndicator != null) {
              try {
                  ActionBar actionBar = activity.getActionBar();
                  info.setHomeActionContentDescription.invoke(actionBar, new Object[]{Integer.valueOf(contentDescRes)});
                  if (Build.VERSION.SDK_INT <= 19) {
                      actionBar.setSubtitle(actionBar.getSubtitle());
                  }
              } catch (Exception e) {
                  Log.w(TAG, "Couldn't set content description via JB-MR2 API", e);
              }
          }
          return info;
      }
  
      public static SetIndicatorInfo setActionBarUpIndicator(Activity activity, Drawable drawable, int contentDescRes) {
          SetIndicatorInfo setIndicatorInfo = new SetIndicatorInfo(activity);
          if (setIndicatorInfo.setHomeAsUpIndicator != null) {
              try {
                  ActionBar actionBar = activity.getActionBar();
                  setIndicatorInfo.setHomeAsUpIndicator.invoke(actionBar, new Object[]{drawable});
                  setIndicatorInfo.setHomeActionContentDescription.invoke(actionBar, new Object[]{Integer.valueOf(contentDescRes)});
              } catch (Exception e) {
                  Log.w(TAG, "Couldn't set home-as-up indicator via JB-MR2 API", e);
              }
          } else if (setIndicatorInfo.upIndicatorView != null) {
              setIndicatorInfo.upIndicatorView.setImageDrawable(drawable);
          } else {
              Log.w(TAG, "Couldn't set home-as-up indicator");
          }
          return setIndicatorInfo;
      }
  }
  