@Override @SuppressLint("NewApi") public void superStartActivity(Intent intent, int requestCode, Bundle options) { if (VERSION.SDK_INT >= 16) { super.startActivityForResult(intent, requestCode, options); } else { super.startActivityForResult(intent, requestCode); } }
@SuppressLint("NewApi") @Override public void supportInvalidateOptionsMenu() { if (VERSION.SDK_INT >= 11) { super.invalidateOptionsMenu(); } }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mConfig != null) { outState.putParcelable(CONFIG_KEY, mConfig); } }
@Override public void registerForContextMenu(View view) { if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) { super.registerForContextMenu(view); } else { registerForContextMenu(view, this); } }
@Override public final void onContextMenuClosed(android.view.Menu menu) { if (menu instanceof android.view.ContextMenu) { onContextMenuClosed(new ContextMenuWrapper((android.view.ContextMenu) menu)); } else { super.onContextMenuClosed(menu); } }
@Override public void unregisterForContextMenu(View view) { if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) { super.unregisterForContextMenu(view); } else { if (mContextMenuListeners != null) { mContextMenuListeners.remove(view); } } }
@Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { final android.view.ContextMenu nativeMenu; if (menu instanceof ContextMenuWrapper) { nativeMenu = ((ContextMenuWrapper) menu).unwrap(); super.onCreateContextMenu(nativeMenu, view, menuInfo); if (view instanceof ContextMenuCallbackGetter) { final OnCreateContextMenuListener l = ((ContextMenuCallbackGetter) view).getOnCreateContextMenuListener(); if (l != null) { l.onCreateContextMenu(nativeMenu, view, menuInfo); } } } }
@Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); synchronized (mOnWindowFocusChangeListeners) { Iterator<WeakReference<OnWindowFocusChangeListener>> i = mOnWindowFocusChangeListeners.iterator(); while (i.hasNext()) { WeakReference<OnWindowFocusChangeListener> reference = i.next(); if (reference == null) { i.remove(); continue; } OnWindowFocusChangeListener iListener = reference.get(); if (iListener == null) { i.remove(); continue; } iListener.onWindowFocusChanged(hasFocus); } } }
public synchronized void setTheme(int resid, boolean modifyGlobal) { if (resid > ThemeManager._START_RESOURCES_ID) { if (mLastThemeResourceId != resid) { mActionBarContext = null; mMenuInflater = null; super.setTheme(mLastThemeResourceId = resid); } } else { if ((resid & ThemeManager.COLOR_SCHEME_MASK) == 0) { int theme = ThemeManager.getTheme(getIntent(), false); if (theme == 0) { final android.app.Activity activity = getParent(); if (activity != null) { theme = ThemeManager.getTheme(activity.getIntent(), false); } } theme &= ThemeManager.COLOR_SCHEME_MASK; if (theme != 0) { resid |= theme; } } setTheme(ThemeManager.getThemeResource(resid, modifyGlobal)); } }
@Override protected void onPostCreate(Bundle savedInstanceState) { requestDecorView(null, null, -1); super.onPostCreate(savedInstanceState); }
@Override protected void onDestroy() { super.onDestroy(); LayoutInflater.removeInstance(this); }
@Override protected void onCreate(Bundle savedInstanceState) { forceInit(savedInstanceState); super.onCreate(savedInstanceState); }
@Override public void onContextMenuClosed(ContextMenu menu) { if (menu instanceof ContextMenuWrapper) { super.onContextMenuClosed(((ContextMenuWrapper) menu).unwrap()); } }