Called when the activity is first created.
547236
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page_objects_home);
    }
947713
public void onCreate() {
		Bundle bundle = new Bundle();
		if (mParentDelegate != null) {
			bundle = mParentDelegate.mBundle;
		}

		onCreate(bundle);
	}
815985
@Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        // Load mImm
        mImm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);

        if(mConstruct != null && mConstruct.getDesign().isMaterial()) {

            // Apply construct to UI
            if (mTitle != null && mMessage != null) {
                if (mConstruct.getTitle() != null){
                    mTitle.setText(mConstruct.getTitle());
                }else{
                    mTitle.setVisibility(View.GONE);

                    // Add padding to the message
                    int padding = getResources().getDimensionPixelSize(R.dimen.material_spacing);
                    mMessage.setPadding(0, padding, 0, 0);
                }

                if (mConstruct.getMessage() != null) {
                    if(mConstruct.getMovementMethod() != null)
                        mMessage.setMovementMethod(mConstruct.getMovementMethod());

                    mMessage.setAutoLinkMask(mConstruct.getAutoLinkMask());
                    mMessage.setText(mConstruct.getMessage());
                }else
                    mContentFrame.removeView(mMessageScrollview);

                if (mConstruct.getDesign().isMaterial()) {
                    FontLoader.applyTypeface(mTitle, Types.ROBOTO_MEDIUM);
                    FontLoader.applyTypeface(mMessage, Types.ROBOTO_REGULAR);
                }
            }

            if (mButtonContainer != null && mConstruct.getButtonConfig().size() > 0) {

                // Iterate through config, and setup the button states
                LinkedHashMap<Integer, Delivery.ButtonConfig> config = mConstruct.getButtonConfig();
                List<Integer> keys = new ArrayList<>(config.keySet());

                // Sort the button keys for proper sorting
                Collections.sort(keys, mButtonComparator);

                int N = keys.size();
                for (int i = 0; i < N; i++) {
                    final int key = keys.get(i);
                    final Delivery.ButtonConfig cfg = config.get(key);

                    // Pull button Color
                    int textColor = mConstruct.getButtonTextColor(key);

                    // Inflate the RippleView wrapped Button based on design
                    RippleView button = (RippleView)getActivity().getLayoutInflater()
                            .inflate(mConstruct.getDesign().isLight() ?
                                    R.layout.material_light_dialog_button :
                                    R.layout.material_dark_dialog_button, null, false);

                    // Load the Button from the ripple view
                    Button rippleButton = (Button) button.findViewById(R.id.ripple_button);

                    // Apply parameters to the button
                    FontLoader.applyTypeface(rippleButton, Types.ROBOTO_MEDIUM);
                    rippleButton.setId(key);
                    rippleButton.setText(cfg.title);
                    if(textColor != 0) rippleButton.setTextColor(textColor);
                    rippleButton.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            long delay = getActivity().getResources()
                                    .getInteger(R.integer.ripple_duration) + DELAY_BUFFER;
                            new Handler().postDelayed(new Runnable() {
                                @Override
                                public void run() {
                                    cfg.listener.onClick(getDialog(), key);
                                    if(mConstruct.getStyle() != null){
                                        mConstruct.getStyle().onButtonClicked(key, getDialog());
                                    }
                                }
                            }, delay);
                        }
                    });

                    // add to layout
                    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                            ViewGroup.LayoutParams.WRAP_CONTENT,
                            getActivity().getResources().getDimensionPixelSize(R.dimen.material_button_height));

                    mButtonContainer.addView(button, params);
                }

            }else if(mButtonContainer != null && mConstruct.getButtonCount() == 0){
                mButtonContainer.setVisibility(View.GONE);
            }

            // Load Content
            if (mStyleContent != null && mConstruct.getStyle() != null) {
                mStyleContent.addView(mConstruct.getStyle().getContentView());
            }

        }

        if(mConstruct != null) {
            // Lastly apply the other dialog options
            setCancelable(mConstruct.isCancelable());
            getDialog().setCanceledOnTouchOutside(mConstruct.isCanceledOnTouchOutside());
            getDialog().setOnShowListener(new DialogInterface.OnShowListener() {
                @Override
                public void onShow(DialogInterface dialog) {
                    if (mConstruct.getOnShowListener() != null)
                        mConstruct.getOnShowListener().onShow(dialog);
                    if (mConstruct.getStyle() != null)
                        mConstruct.getStyle().onDialogShow(getDialog());

                    if (mConstruct.isShowKeyboardOnDisplay()) {
                        if (mConstruct.getStyle() instanceof EditTextStyle) {
                            EditText et = ((EditTextStyle) mConstruct.getStyle()).getEditTextView();
                            mImm.showSoftInput(et, InputMethodManager.SHOW_IMPLICIT);
                        }
                    }

                }
            });
        }else{
            dismiss();
        }

    }
1316374
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Fragment fragment = getSupportFragmentManager().findFragmentById(android.R.id.content);
        if (fragment == null) {
            fragment = MainFragment.newInstance(getIntent().getExtras());
            getSupportFragmentManager()
                    .beginTransaction()
                    .replace(android.R.id.content, fragment, "")
                    .commit();
        } else {
            getSupportFragmentManager()
                    .beginTransaction()
                    .attach(fragment)
                    .commit();
        }
    }
361057
public void initNavDrawer(Toolbar appBar) {
		if (getActivityIf().isNavDrawerEnabled()) {
			navDrawer = getActivityIf().createNavDrawer(activity, appBar);
			navDrawer.init();
		}
	}
269107
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_eula);
        initUI();
        parseExtras(savedInstanceState);
    }
850856
final void rawLaunchIntent(Intent intent) {
    if (intent != null) {
      intent.addFlags(Intents.FLAG_NEW_DOC);
      activity.startActivity(intent);
    }
  }
1289661
public synchronized void initialRequestDone() {
        initialRequestDone = true;
        if (previousAsyncContext != null) {
            previousAsyncContext.onAsyncStart(this);
            previousAsyncContext = null;
        }
        if (!processingAsyncTask) {
            processAsyncTask();
        }
        initiatingThread = null;
    }
998296
public void onCreate(Bundle savedInstanceState) {
        Session session = Session.getActiveSession();
        if (session == null) {
            if (savedInstanceState != null) {
                session = Session.restoreSession(activity, null, callback, savedInstanceState);
            }
            if (session == null) {
                session = new Session(activity);
            }
            Session.setActiveSession(session);
        }
        if (savedInstanceState != null) {
            pendingFacebookDialogCall = savedInstanceState.getParcelable(DIALOG_CALL_BUNDLE_SAVE_KEY);
        }
    }
706448
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        createSharedPreferences();
        createMapViews();
        createTileCaches();
        checkPermissionsAndCreateLayersAndControls();
    }
725327
@Override
	public final void onCreate(SQLiteDatabase db) {
		ConnectionSource cs = getConnectionSource();
		/*
		 * The method is called by Android database helper's get-database calls when Android detects that we need to
		 * create or update the database. So we have to use the database argument and save a connection to it on the
		 * AndroidConnectionSource, otherwise it will go recursive if the subclass calls getConnectionSource().
		 */
		DatabaseConnection conn = cs.getSpecialConnection(null);
		boolean clearSpecial = false;
		if (conn == null) {
			conn = new AndroidDatabaseConnection(db, true, cancelQueriesEnabled);
			try {
				cs.saveSpecialConnection(conn);
				clearSpecial = true;
			} catch (SQLException e) {
				throw new IllegalStateException("Could not save special connection", e);
			}
		}
		try {
			onCreate(db, cs);
		} finally {
			if (clearSpecial) {
				cs.clearSpecialConnection(conn);
			}
		}
	}
994780
@Override @SuppressLint("NewApi")
    public void onCreate(Bundle savedInstanceState) {
        // Set window transition elements
        if(BuildUtils.isLollipop()) {
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);

            TransitionSet transitions = new TransitionSet()
                    .addTransition(new ChangeBounds())
                    .addTransition(new Fade());

            getWindow().setEnterTransition(new Explode());
            getWindow().setExitTransition(new Explode());
            getWindow().setSharedElementEnterTransition(transitions);
            getWindow().setSharedElementExitTransition(transitions);
        }

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_license);

        // Load UI
        mToolbar = ButterKnife.findById(this, R.id.appbar);
        mRecyler = ButterKnife.findById(this, R.id.recycler);

        // Set the toolbar as the support actionbar
        setSupportActionBar(mToolbar);
        parseExtras(savedInstanceState);

        // Set listeners
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        mToolbar.setNavigationOnClickListener(this);

        mRecyler.setAdapter(mAdapter);
        mRecyler.setLayoutManager(new LinearLayoutManager(this));
        mRecyler.setItemAnimator(new DefaultItemAnimator());
        mRecyler.addItemDecoration(new StickyRecyclerHeadersElevationDecoration(mAdapter));
        mAdapter.setOnItemClickListener(this);

    }
758971
static void onActivityCreated(Activity activity) {
        // make sure we have at least the default instance created here.
        if (instances == null) {
            CleverTapAPI.createInstanceIfAvailable(activity, null);
        }

        if (instances == null) {
            Logger.v("Instances is null in onActivityCreated!");
            return;
        }

        boolean alreadyProcessedByCleverTap = false;
        Bundle notification = null;
        Uri deepLink = null;
        String _accountId = null;

        // check for launch deep link
        try {
            Intent intent = activity.getIntent();
            deepLink = intent.getData();
            if (deepLink != null) {
                Bundle queryArgs = UriHelper.getAllKeyValuePairs(deepLink.toString(), true);
                _accountId = queryArgs.getString(Constants.WZRK_ACCT_ID_KEY);
            }
        } catch (Throwable t) {
            // Ignore
        }

        // check for launch via notification click
        try {
            notification = activity.getIntent().getExtras();
            if (notification != null && !notification.isEmpty()) {
                try {
                    alreadyProcessedByCleverTap = (notification.containsKey(Constants.WZRK_FROM_KEY) && Constants.WZRK_FROM.equals(notification.get(Constants.WZRK_FROM_KEY)));
                    if (alreadyProcessedByCleverTap){
                        Logger.v("ActivityLifecycleCallback: Notification Clicked already processed for "+ notification.toString() +", dropping duplicate.");
                    }
                    if (notification.containsKey(Constants.WZRK_ACCT_ID_KEY)) {
                        _accountId = (String) notification.get(Constants.WZRK_ACCT_ID_KEY);
                    }
                } catch (Throwable t) {
                    // no-op
                }
            }
        } catch (Throwable t) {
            // Ignore
        }

        if (alreadyProcessedByCleverTap && deepLink == null) return;

        for (String accountId: CleverTapAPI.instances.keySet()) {
            CleverTapAPI instance = CleverTapAPI.instances.get(accountId);

            boolean shouldProcess = false;
            if (instance != null) {
                shouldProcess = (_accountId == null && instance.config.isDefaultInstance()) || instance.getAccountId().equals(_accountId);
            }

            if (shouldProcess) {
                if (notification != null && !notification.isEmpty() && notification.containsKey(Constants.NOTIFICATION_TAG)) {
                    instance.pushNotificationClickedEvent(notification);
                }

                if (deepLink != null) {
                    try {
                        instance.pushDeepLink(deepLink);
                    } catch (Throwable t) {
                        // no-op
                    }
                }
                break;
            }
        }
    }
283472
protected void onInit(Holo config, Bundle savedInstanceState) {
        if (mInited) {
            throw new IllegalStateException("This instance was already inited");
        }
        mInited = true;
        if (config == null) {
            config = createConfig(savedInstanceState);
        }
        if (config == null) {
            config = Holo.defaultConfig();
        }
        onPreInit(config, savedInstanceState);
        if (!config.ignoreApplicationInstanceCheck && !(getApplication() instanceof Application)) {
            boolean throwError = true;
            if (config.allowMockApplicationInstance) {
                try {
                    throwError = !(getApplication() instanceof MockApplication);
                    if (!throwError) {
                        Log.w("HoloEverywhere", "Application instance is MockApplication. Wow. Let's begin tests...");
                    }
                } catch (Exception e) {
                }
            }
            if (throwError) {
                String text = "Application instance isn't HoloEverywhere.\n";
                if (getApplication().getClass() == android.app.Application.class) {
                    text += "Put attr 'android:name=\"org.holoeverywhere.app.Application\"'" +
                            " in <application> tag of AndroidManifest.xml";
                } else {
                    text += "Please sure that you extend " + getApplication().getClass() +
                            " from a org.holoeverywhere.app.Application";
                }
                throw new IllegalStateException(text);
            }
        }
        getLayoutInflater().setFragmentActivity(this);
        if (this instanceof Activity) {
            final Activity activity = (Activity) this;
            ThemeManager.applyTheme(activity, mLastThemeResourceId == 0);
            if (!config.ignoreThemeCheck && ThemeManager.getThemeType(this) == ThemeManager.INVALID) {
                throw new HoloThemeException(activity);
            }
            TypedArray a = obtainStyledAttributes(new int[]{android.R.attr.windowActionBarOverlay, R.attr.windowActionBarOverlay});
            if (a.getBoolean(0, false) || a.getBoolean(1, false)) {
                supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
            }
            a.recycle();
            a = obtainStyledAttributes(new int[]{android.R.attr.windowActionModeOverlay, R.attr.windowActionBarOverlay});
            if (a.getBoolean(0, false) || a.getBoolean(1, false)) {
                supportRequestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
            }
            a.recycle();
        }
        onPostInit(config, savedInstanceState);
        lockAttaching();
    }
350437
@OnLifecycleEvent(Lifecycle.Event.ON_START)
  public void onStart() {
    if (navigation != null) {
      navigation.addProgressChangeListener(progressChangeListener);
    }
  }
1253379
private void initializeDrawer() {
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer,
        R.string.show, R.string.hide);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    mDrawerToggle.syncState();
  }
1231228
@Override
	public ActivityDelegate createActivityDelegate(AbstractFragmentActivity abstractFragmentActivity) {
		return !fcmInitialized ? new ActivityDelegate(abstractFragmentActivity) {

			@Override
			public void onCreate(Bundle savedInstanceState) {
				if (!fcmInitialized) {
					startFcmRegistration(true);
					fcmInitialized = true;
				}
			}
		} : null;
	}