/** * Construct a BackgroundManager instance. The Initial background is set from the continuity * service. * * @deprecated Use getInstance(Activity). */ @Deprecated public BackgroundManager(Activity activity) { mContext = activity; mService = BackgroundContinuityService.getInstance(); mHeightPx = mContext.getResources().getDisplayMetrics().heightPixels; mWidthPx = mContext.getResources().getDisplayMetrics().widthPixels; mHandler = new Handler(); TypedArray ta = activity.getTheme().obtainStyledAttributes(new int[] {android.R.attr.windowBackground}); mThemeDrawableResourceId = ta.getResourceId(0, -1); if (mThemeDrawableResourceId < 0) { if (DEBUG) Log.v(TAG, "BackgroundManager no window background resource!"); } ta.recycle(); createFragment(activity); }