Ejemplo n.º 1
0
 // /////////////////////////////////////////////////////////////
 // SYNC OBSERVER
 // ////////////////////////////////////////////////////////////
 private boolean isSyncActive() {
   try {
     return ContentResolver.isSyncActive(
         AlfrescoAccountManager.getInstance(getActivity())
             .getAndroidAccount(SessionUtils.getAccount(getActivity()).getId()),
         SyncContentProvider.AUTHORITY);
   } catch (Exception e) {
     return false;
   }
 }
Ejemplo n.º 2
0
  // ///////////////////////////////////////////////////////////////////////////
  // LIFECYCLE
  // ///////////////////////////////////////////////////////////////////////////
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    acc = SessionUtils.getAccount(getActivity());

    adapter = onAdapterCreation();
    gv.setAdapter(adapter);
    setListShown(false);
    getLoaderManager().initLoader(0, null, this);
  }
 @Override
 public void onListItemClick(GridView l, View v, int position, long id) {
   super.onListItemClick(l, v, position, id);
   CloudNetwork network = (CloudNetwork) l.getItemAtPosition(position);
   AlfrescoAccount currentAccount = SessionUtils.getAccount(getActivity());
   if (currentAccount != null
       && !currentAccount.getRepositoryId().equals(network.getIdentifier())) {
     EventBusManager.getInstance()
         .post(new RequestSessionEvent(currentAccount, network.getIdentifier(), true));
     getActivity()
         .getSupportFragmentManager()
         .popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
   }
 }
Ejemplo n.º 4
0
 @Override
 public void onStart() {
   acc = SessionUtils.getAccount(getActivity());
   getActivity().invalidateOptionsMenu();
   super.onStart();
 }