Resolves the theme to be used for the dialog.

@return The theme.
498788
@StyleRes
    private int resolveTheme() {
        // First check if getTheme() returns some usable theme.
        int theme = getTheme();
        if (theme != 0) {
            return theme;
        }

        // Get the light/dark attribute from the Activity's Theme.
        boolean useLightTheme = isActivityThemeLight();

        // Now check if developer overrides the Activity's Theme with an argument.
        Bundle args = getArguments();
        if (args != null) {
            if (args.getBoolean(BaseDialogBuilder.ARG_USE_DARK_THEME)) {
                // Developer is explicitly using the dark theme.
                useLightTheme = false;
            } else if (args.getBoolean(BaseDialogBuilder.ARG_USE_LIGHT_THEME)) {
                // Developer is explicitly using the light theme.
                useLightTheme = true;
            }
        }

        return useLightTheme ? R.style.SDL_Dialog : R.style.SDL_Dark_Dialog;
    }
1114366
@Pure
	public static Object getContextResolver() throws AndroidException {
		Object resolver;
		synchronized (Android.class) {
			resolver = (contextResolver == null) ? null : contextResolver.get();
		}
		if (resolver == null) {
			final Object context = getContext();
			try {
				final Class<?> resolverType = getContextResolverClass();
				final Class<?> contextType = context.getClass();
				final Method getContextResolverMethod = contextType.getMethod("getContentResolver"); //$NON-NLS-1$
				resolver = getContextResolverMethod.invoke(context);
				resolver = resolverType.cast(resolver);
				synchronized (Android.class) {
					contextResolver = new WeakReference<>(resolver);
				}
			} catch (AssertionError e) {
				throw e;
			} catch (Throwable e) {
				throw new AndroidException(e);
			}
		}
		return resolver;
	}
152707
private void obtainTitleColor(final int theme) {
        TypedArray typedArray = getContext().getTheme()
                .obtainStyledAttributes(theme, new int[]{android.R.attr.textColorPrimary});
        int textColorPrimary = typedArray.getResourceId(0, 0);
        typedArray.recycle();

        if (textColorPrimary != 0) {
            int titleColor = ContextCompat.getColor(getContext(), textColorPrimary);
            toolbar.setTitleTextColor(titleColor);
        }
    }
580543
public String getResolved() {
    if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_resolved == null)
      jcasType.jcas.throwFeatMissing("resolved", "de.julielab.jules.types.Coordination");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Coordination_Type)jcasType).casFeatCode_resolved);}
563698
@Bean
  public ViewResolver viewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    resolver.setCache(true);
    resolver.setSuffix(".ftl");
    resolver.setContentType("text/html;charset=UTF-8");
    return resolver;
  }
1372167
public function resolveTemplate()
    {
        if (strpos($this->template, '*') !== false) {
            return str_replace('*', $this->getTheme(), $this->template);
        }
        return $this->template;
    }
1074517
@Override
	public String themePath(String theTheme) {
		StringBuilder src = dots(new StringBuilder());
		if(theTheme==null||theTheme.length()==0) {
			src.append(theme);
			if(theme.length()>0)src.append('/');
		} else {
			src.append(theTheme);
			src.append('/');
		}

		return src.toString();
	}
410851
public String resolve() {
		Timestamp timestamp = RuntimeProvider.createTimestamp();
		StringBuilder builder = new StringBuilder();
		for (Segment segment : segments) {
			builder.append(segment.createToken(builder.toString(), timestamp));
		}
		return builder.toString();
	}
1301853
public static ThemeController get() {
		if (ThemeController.instance == null) {
			ThemeController.instance = GWT.create(ThemeController.class);
		}
		return ThemeController.instance;
	}
236758
public EmbedVaadinComponent withTheme(String theme) {
        assertNotNull(theme, "theme could not be null.");
        getConfig().setTheme(theme);
        return self();
    }
961835
@Override
	public InputSource resolve(ScssStylesheet parentStylesheet, String identifier) {
		// Remove a possible ".scss" suffix
		identifier = identifier.replaceFirst(".scss$", "");
		String parentPath = parentStylesheet.getFileName().replace('\\', '/');
		String path = PathNormalizer.concatWebPath(parentPath, identifier);

		InputSource source = resolveNormalized(path);

		if (source != null) {
			return source;
		}

		// Try to find partial import (_identifier.scss)
		path = PathNormalizer.getParentPath(path) + "_" + PathNormalizer.getPathName(path);

		source = normalizeAndResolve(path);

		if (source != null) {
			return source;
		}

		return normalizeAndResolve(identifier);
	}
971162
protected URL resolveURL() {
		if (this.clazz != null) {
			return this.clazz.getResource(this.path);
		}
		else if (this.classLoader != null) {
			return this.classLoader.getResource(this.path);
		}
		else {
			return ClassLoader.getSystemResource(this.path);
		}
	}
1363889
public function resolve()
    {
        if (!empty($this->resolvedParameters)) {
            return $this->attributes;
        }
        $this->evaluateRequirements($this->attributes);
        $this->resolveAllParameters();

        return $this->attributes;
    }
23978
public function theme($theme = null)
    {
        if ($theme === null) {
            return $this->_theme;
        }
        $this->_theme = $theme;

        return $this;
    }
877667
private void obtainPadding(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogPaddingLeft, R.attr.materialDialogPaddingTop,
                        R.attr.materialDialogPaddingRight, R.attr.materialDialogPaddingBottom});
        int defaultLeftPadding =
                getContext().getResources().getDimensionPixelSize(R.dimen.dialog_left_padding);
        int defaultTopPadding =
                getContext().getResources().getDimensionPixelSize(R.dimen.dialog_top_padding);
        int defaultRightPadding =
                getContext().getResources().getDimensionPixelSize(R.dimen.dialog_right_padding);
        int defaultBottomPadding =
                getContext().getResources().getDimensionPixelSize(R.dimen.dialog_bottom_padding);
        int left = typedArray.getDimensionPixelSize(0, defaultLeftPadding);
        int top = typedArray.getDimensionPixelSize(1, defaultTopPadding);
        int right = typedArray.getDimensionPixelSize(2, defaultRightPadding);
        int bottom = typedArray.getDimensionPixelSize(3, defaultBottomPadding);
        setPadding(left, top, right, bottom);
    }
110083
public function getThemesRoot(): string
    {
        return $this->getAppRoot().Constants::DS.$this->config[ConfigurationInterface::KEY_THEMES_ROOT];
    }
1081409
public function getThemesConfig()
    {
        if (empty($this->config['Rcm'])
            || empty($this->config['Rcm']['themes'])
        ) {
            throw new RuntimeException(
                'No Themes found defined in configuration.  Please report the issue
                 with the themes author.'
            );
        }

        return $this->config['Rcm']['themes'];
    }