private void loadThemeInformation(
			boolean reloadGallery )
	{
		ThemeService service = new ThemeService( this );
		themeInformation = service.queryTheme( packageName , destClassName );
		if( themeInformation.isInstalled() )
		{
			Context dstContext = null;
			try
			{
				dstContext = createPackageContext( packageName , Context.CONTEXT_IGNORE_SECURITY );
			}
			catch( NameNotFoundException e )
			{
				e.printStackTrace();
				return;
			}
			Log.v( LOG_TAG , "2222222222222222destClassName = " + destClassName );
			ContentConfig destContent = new ContentConfig();
			destContent.loadConfig( dstContext , destClassName );
			themeInformation.loadInstallDetail( dstContext , destContent );
			if( reloadGallery )
			{
				themeLocalAdapter = new ThemePreviewLocalAdapter( this , destContent , dstContext , false );
				galleryPreview.setAdapter( themeLocalAdapter );
			}
			return;
		}
		if( reloadGallery )
		{
			galleryPreview.setAdapter( new ThemePreviewHotAdapter( this , packageName , downModule , false ) );
		}
	}
Exemplo n.º 2
0
	// teapotXu_20130304: add start
	// set a flag that indicates whether the ThemeSelectIcon launched the
	// ThemeBox or Launcher app.
	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
		if (b_theme_icon_start_launcher == true) {
			String theme_icon_pkgName = getIntent().getStringExtra(
					"FROM_PACKAGE");


			// start the launcher directly
			ThemeService sv = new ThemeService(this);

			sv.applyTheme(sv.queryComponent(theme_icon_pkgName));
			sendBroadcast(new Intent(StaticClass.ACTION_DEFAULT_THEME_CHANGED));
			ActivityManager.KillActivity();
		}
	}