- removed all openphoto references from the source of app (project name,
package name, style names, classes names, etc)
This commit is contained in:
Eugene Popovich 2013-01-28 13:32:04 +02:00
parent 6d497a8cec
commit 9958fdd504
136 changed files with 880 additions and 795 deletions

View file

@ -14,9 +14,9 @@ https://github.com/photo/mobile-android/blob/master/README.md
Install Facebook SDK by cloning the GitHub repository: git clone git://github.com/facebook/facebook-android-sdk.git
# Fake Account Credentials for OpenPhoto
The file `FakeAccountOpenPhotoApi.java` is a fake implementation for the interface `IAccountOpenOpenphotoApi.java`.
This fake implementation will return credentials to the site http://apigee.openphoto.me
# Fake Account Credentials for Trovebox
The file `FakeAccountTroveboxApi.java` is a fake implementation for the interface `IAccountTroveboxApi.java`.
This fake implementation will return credentials to the site http://apigee.trovebox.com
#Environment

View file

@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OpenPhoto</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Trovebox-Android-App</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.openphoto.android.app"
package="com.trovebox.android.app"
android:installLocation="auto"
android:versionCode="4"
android:versionName="1.2" >
@ -9,35 +9,35 @@
android:minSdkVersion="7"
android:targetSdkVersion="17" />
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:name=".OpenPhotoApplication"
android:name=".TroveboxApplication"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/Theme.OpenPhoto.Light" >
android:theme="@style/Theme.Trovebox.Light" >
<activity android:name=".SplashActivity" />
<activity
android:name=".SetupActivity"
android:launchMode="singleTask"
android:theme="@style/Theme.OpenPhoto.Login" >
android:theme="@style/Theme.Trovebox.Login" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="openphoto" />
<data android:scheme="trovebox" />
</intent-filter>
</activity>
<activity
@ -55,20 +55,20 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="openphoto-t" />
<data android:scheme="trovebox-t" />
</intent-filter>
</activity>
<activity
android:name=".PhotoDetailsActivity"
android:launchMode="singleTask"
android:theme="@style/Theme.OpenPhoto.TransparentActionBar" >
android:theme="@style/Theme.Trovebox.TransparentActionBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="openphoto-t2" />
<data android:scheme="trovebox-t2" />
</intent-filter>
</activity>
<activity
@ -85,24 +85,24 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="openphoto-t3" />
<data android:scheme="trovebox-t3" />
</intent-filter>
</activity>
<activity android:name=".SettingsActivity" />
<activity
android:name=".AccountLogin"
android:theme="@style/Theme.OpenPhoto.Login" />
android:theme="@style/Theme.Trovebox.Login" />
<activity
android:name=".AccountSignup"
android:theme="@style/Theme.OpenPhoto.Login" />
android:theme="@style/Theme.Trovebox.Login" />
<activity
android:name=".AccountActivity"
android:theme="@style/Theme.OpenPhoto.Login" />
android:theme="@style/Theme.Trovebox.Login" />
<activity
android:name=".SelectTagsActivity"
android:configChanges="orientation"
android:label="@string/title_activity_select_tags"
android:theme="@style/Theme.OpenPhoto.DialogActivity.Light" >
android:theme="@style/Theme.Trovebox.DialogActivity.Light" >
</activity>
<activity
android:name="com.aviary.android.feather.FeatherActivity"
@ -138,14 +138,14 @@
<provider
android:name=".provider.UploadsProvider"
android:authorities="me.openphoto.android.app" />
android:authorities="com.trovebox.android.app" />
<!-- Required for the hi-res image processing -->
<!-- authorities can have the value you prefer -->
<provider
android:name="com.aviary.android.feather.library.providers.FeatherContentProvider"
android:authorities="me.openphoto.aviary.launcher.HiResProvider"
android:authorities="com.trovebox.aviary.launcher.HiResProvider"
android:exported="false" >
</provider>
</application>
</manifest>
</manifest>

View file

@ -1,2 +1,2 @@
key.store=keystore/openphoto.keystore
key.alias=Openphoto Keystore
key.store=keystore/trovebox.keystore
key.alias=Trovebox Keystore

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="OpenPhoto-Android-App" default="help">
<project name="Trovebox-Android-App" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View file

@ -27,7 +27,7 @@
<Button
android:id="@+id/account_signup_button"
style="@style/Openphoto.BeigeWithIconButton"
style="@style/Trovebox.BeigeWithIconButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="accountSignupButtonAction"
@ -48,7 +48,7 @@
<Button
android:id="@+id/account_login_button"
style="@style/Openphoto.BeigeWithIconButton"
style="@style/Trovebox.BeigeWithIconButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="accountLoginButtonAction"
@ -65,7 +65,7 @@
<Button
android:id="@+id/account_own_server_button"
style="@style/Openphoto.BeigeButton"
style="@style/Trovebox.BeigeButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="accountOwnServerButtonAction"

View file

@ -43,7 +43,7 @@
<Button
android:id="@+id/button_login"
style="@style/Openphoto.YellowButton"
style="@style/Trovebox.YellowButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="loginButtonAction"

View file

@ -50,7 +50,7 @@
<Button
android:id="@+id/button_create_account"
style="@style/Openphoto.YellowButton"
style="@style/Trovebox.YellowButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="createAccountButtonAction"

View file

@ -4,18 +4,18 @@
android:layout_height="match_parent"
android:clickable="true">
<me.openphoto.android.app.ui.widget.PhotoViewHackyViewPager
<com.trovebox.android.app.ui.widget.PhotoViewHackyViewPager
android:id="@+id/photos"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<me.openphoto.android.app.ui.widget.HorizontalListView
<com.trovebox.android.app.ui.widget.HorizontalListView
android:layout_width="match_parent"
android:layout_height="@dimen/detail_thumbnail_with_border_size"
android:id="@+id/thumbs"
android:layout_above="@+id/gap"
android:visibility="visible">
</me.openphoto.android.app.ui.widget.HorizontalListView>
</com.trovebox.android.app.ui.widget.HorizontalListView>
<View android:id="@+id/gap" android:layout_height="50dp"
android:layout_width="0dp"

View file

@ -36,7 +36,7 @@
<Button
android:id="@+id/button_login"
style="@style/Openphoto.YellowButton"
style="@style/Trovebox.YellowButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/login" />

View file

@ -18,6 +18,6 @@
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:gravity="center"
android:text="@string/openphoto" />
android:text="@string/app_name" />
</LinearLayout>

View file

@ -125,7 +125,7 @@
<Button
android:id="@+id/button_upload"
style="@style/Openphoto.YellowButton"
style="@style/Trovebox.YellowButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/upload_button" />

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:holo="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res/me.openphoto.android.app"
xmlns:app="http://schemas.android.com/apk/res/com.trovebox.android.app"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/me.openphoto.android.app"
xmlns:app="http://schemas.android.com/apk/res/com.trovebox.android.app"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
@ -78,7 +78,7 @@
<Button
android:id="@+id/uploadBtn"
style="@style/Openphoto.YellowButton"
style="@style/Trovebox.YellowButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/upload_button" />

View file

@ -15,7 +15,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center" >
<me.openphoto.android.app.ui.widget.AspectRatioImageView
<com.trovebox.android.app.ui.widget.AspectRatioImageView
android:id="@+id/newest_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.OpenPhoto.Light" parent="Holo.Theme.Light.DarkActionBar">
<style name="Theme.Trovebox.Light" parent="Holo.Theme.Light.DarkActionBar">
<item name="android:windowBackground">@drawable/bg</item>
<item name="android:listViewStyle">@style/TransparentListView</item>
<item name="android:expandableListViewStyle">@style/TransparentExpandableListView</item>
@ -9,7 +9,7 @@
<item name="android:actionBarStyle">@style/solid_ActionBar</item>
<item name="actionBarTabTextStyle">@style/ActionBar_TabTextStyle</item>
<item name="android:actionBarTabTextStyle">@style/ActionBar_TabTextStyle</item>
<item name="android:buttonStyle">@style/Openphoto.BeigeButton</item>
<item name="android:buttonStyle">@style/Trovebox.BeigeButton</item>
<item name="actionBarTabStyle">@style/trovebox_ActionBarTabStyle</item>
<item name="android:actionBarTabStyle">@style/trovebox_ActionBarTabStyle</item>
<item name="actionBarItemBackground">@drawable/selectable_background_trovebox</item>
@ -24,12 +24,12 @@
<item name="android:actionBarWidgetTheme">@style/Theme.example.widget</item>
</style>
<style name="Theme.OpenPhoto.Light.Stacked" parent="Theme.OpenPhoto.Light">
<style name="Theme.Trovebox.Light.Stacked" parent="Theme.Trovebox.Light">
<item name="actionBarTabTextStyle">@style/ActionBar_TabTextStyleStacked</item>
<item name="android:actionBarTabTextStyle">@style/ActionBar_TabTextStyleStacked</item>
</style>
<style name="Theme.OpenPhoto.TransparentActionBar" parent="Holo.Theme.Light.Fullscreen">
<style name="Theme.Trovebox.TransparentActionBar" parent="Holo.Theme.Light.Fullscreen">
<item name="actionBarStyle">@style/transparent_ActionBar</item>
<item name="android:actionBarStyle">@style/transparent_ActionBar</item>
<item name="android:windowBackground">@drawable/bg</item>

View file

@ -39,10 +39,10 @@
<string name="facebook_app_id">486985971321265</string>
<string name="twitter_api_consumer_key">Z0EVWNVma30RFZH8nJphog</string>
<string name="twitter_api_consumer_secret">wt2PQuFHwai0ffPvAnlPsQc8W0DIUjeUyvnCOvbQb3E</string>
<string name="twitter_callback_url">openphoto-t://twitter-callback</string>
<string name="twitter_callback_url_photodetails_activity">openphoto-t2://twitter-callback</string>
<string name="twitter_callback_url_upload_activity">openphoto-t3://twitter-callback</string>
<string name="openphoto_oauth_callback_url">openphoto://callback</string>
<string name="twitter_callback_url">trovebox-t://twitter-callback</string>
<string name="twitter_callback_url_photodetails_activity">trovebox-t2://twitter-callback</string>
<string name="twitter_callback_url_upload_activity">trovebox-t3://twitter-callback</string>
<string name="trovebox_oauth_callback_url">trovebox://callback</string>
<string name="feather_api_key">WJhD1NTYdkm_OrBNEOPQpA</string>
<!-- Facebook preferences -->

View file

@ -2,7 +2,6 @@
<resources>
<string name="app_name">Trovebox</string>
<string name="openphoto">OpenPhoto</string>
<string name="loading">Loading&#8230;</string>
<string name="take_photo">Take Photo</string>
@ -60,7 +59,7 @@
<!-- SetupActivity -->
<string name="hint_server">username.trovebox.com</string>
<string name="login">Login</string>
<string name="get_openphoto_account">Get an openphoto account</string>
<string name="get_trovebox_account">Get an trovebox account</string>
<string name="logging_in_message">Please wait. Logging you in…</string>
<string name="signup_message">Please wait. Registering new user…</string>

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.OpenPhoto.Light" parent="Holo.Theme.Light.DarkActionBar">
<style name="Theme.Trovebox.Light" parent="Holo.Theme.Light.DarkActionBar">
<item name="android:windowBackground">@drawable/bg</item>
<item name="android:listViewStyle">@style/TransparentListView</item>
<item name="android:expandableListViewStyle">@style/TransparentExpandableListView</item>
<item name="actionBarStyle">@style/solid_ActionBar</item>
<item name="actionBarTabTextStyle">@style/ActionBar_TabTextStyle</item>
<item name="android:buttonStyle">@style/Openphoto.BeigeButton</item>
<item name="android:buttonStyle">@style/Trovebox.BeigeButton</item>
<item name="actionBarTabStyle">@style/trovebox_ActionBarTabStyle</item>
<item name="actionBarItemBackground">@drawable/selectable_background_trovebox</item>
<item name="actionDropDownStyle">@style/trovebox_DropDownNav</item>
@ -16,28 +16,28 @@
<item name="actionBarWidgetTheme">@style/Theme.example.widget</item>
</style>
<style name="Theme.OpenPhoto.Light.Stacked" parent="Theme.OpenPhoto.Light">
<style name="Theme.Trovebox.Light.Stacked" parent="Theme.Trovebox.Light">
<item name="actionBarTabTextStyle">@style/ActionBar_TabTextStyleStacked</item>
</style>
<style name="Theme.OpenPhoto.DialogActivity.Light" parent="Holo.Theme.Dialog.Light">
<item name="android:buttonStyle">@style/Openphoto.BeigeButton</item>
<style name="Theme.Trovebox.DialogActivity.Light" parent="Holo.Theme.Dialog.Light">
<item name="android:buttonStyle">@style/Trovebox.BeigeButton</item>
</style>
<style name="Theme.OpenPhoto.Dialog.Light" parent="Holo.Theme.Dialog.Alert.Light">
<item name="android:buttonStyle">@style/Openphoto.BeigeButton</item>
<style name="Theme.Trovebox.Dialog.Light" parent="Holo.Theme.Dialog.Alert.Light">
<item name="android:buttonStyle">@style/Trovebox.BeigeButton</item>
</style>
<style name="Theme.OpenPhoto.Fullscreen" parent="Holo.Theme.Light.NoActionBar.Fullscreen">
<style name="Theme.Trovebox.Fullscreen" parent="Holo.Theme.Light.NoActionBar.Fullscreen">
<item name="android:windowBackground">@drawable/bg</item>
</style>
<style name="Theme.OpenPhoto.TransparentActionBar" parent="Holo.Theme.Light.Fullscreen">
<style name="Theme.Trovebox.TransparentActionBar" parent="Holo.Theme.Light.Fullscreen">
<item name="actionBarStyle">@style/transparent_ActionBar</item>
<item name="android:windowBackground">@drawable/bg</item>
</style>
<style name="Theme.OpenPhoto.Login" parent="Holo.Theme.NoActionBar">
<style name="Theme.Trovebox.Login" parent="Holo.Theme.NoActionBar">
<item name="android:windowBackground">@drawable/bg_login</item>
</style>
@ -109,17 +109,17 @@
<item name="android:textSize">10dp</item>
</style>
<style name="Openphoto.YellowButton" parent="Holo.Button">
<style name="Trovebox.YellowButton" parent="Holo.Button">
<item name="android:background">@drawable/btn_bg_yellow</item>
<item name="android:textColor">@color/ab_fg_black</item>
</style>
<style name="Openphoto.BeigeButton" parent="Holo.Button">
<style name="Trovebox.BeigeButton" parent="Holo.Button">
<item name="android:background">@drawable/btn_bg_beige</item>
<item name="android:textColor">@color/ab_fg_black</item>
</style>
<style name="Openphoto.BeigeWithIconButton" parent="Holo.Button">
<style name="Trovebox.BeigeWithIconButton" parent="Holo.Button">
<item name="android:background">@drawable/btn_bg_beige_with_icon</item>
<item name="android:textColor">@color/ab_fg_black</item>
</style>

View file

@ -1,10 +1,12 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.LoginUtils;
import com.trovebox.android.app.util.TrackerUtils;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.LoginUtils;
import me.openphoto.android.app.util.TrackerUtils;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.os.Bundle;

View file

@ -1,20 +1,22 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.net.account.AccountOpenPhotoResponse;
import me.openphoto.android.app.net.account.FakeAccountOpenPhotoApi;
import me.openphoto.android.app.net.account.IAccountOpenPhotoApi;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoginUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.net.account.AccountTroveboxResponse;
import com.trovebox.android.app.net.account.FakeAccountTroveboxApi;
import com.trovebox.android.app.net.account.IAccountTroveboxApi;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoginUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
@ -66,7 +68,7 @@ public class AccountLogin extends CommonActivity
}
private class LogInUserTask extends
AsyncTaskEx<Void, Void, AccountOpenPhotoResponse>
AsyncTaskEx<Void, Void, AccountTroveboxResponse>
{
private Credentials credentials;
private Activity activity;
@ -81,9 +83,9 @@ public class AccountLogin extends CommonActivity
}
@Override
protected AccountOpenPhotoResponse doInBackground(Void... params)
protected AccountTroveboxResponse doInBackground(Void... params)
{
IAccountOpenPhotoApi api = new FakeAccountOpenPhotoApi(
IAccountTroveboxApi api = new FakeAccountTroveboxApi(
this.activity);
try
{
@ -107,7 +109,7 @@ public class AccountLogin extends CommonActivity
}
@Override
protected void onPostExecute(AccountOpenPhotoResponse result)
protected void onPostExecute(AccountTroveboxResponse result)
{
try
{

View file

@ -1,30 +1,32 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.net.account.AccountOpenPhotoResponse;
import me.openphoto.android.app.net.account.FakeAccountOpenPhotoApi;
import me.openphoto.android.app.net.account.IAccountOpenPhotoApi;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoginUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.ProgressDialog;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.net.account.AccountTroveboxResponse;
import com.trovebox.android.app.net.account.FakeAccountTroveboxApi;
import com.trovebox.android.app.net.account.IAccountTroveboxApi;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoginUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
/**
* Class to create new accounts on OpenPhoto
* Class to create new accounts on Trovebox
*
* @author Patrick Santana <patrick@openphoto.me>
* @author Patrick Santana <patrick@trovebox.com>
*/
public class AccountSignup extends CommonActivity
{
@ -76,7 +78,7 @@ public class AccountSignup extends CommonActivity
}
private class NewUserTask extends
AsyncTaskEx<Void, Void, AccountOpenPhotoResponse>
AsyncTaskEx<Void, Void, AccountTroveboxResponse>
{
String username, password, email;
Activity activity;
@ -94,9 +96,9 @@ public class AccountSignup extends CommonActivity
}
@Override
protected AccountOpenPhotoResponse doInBackground(Void... params)
protected AccountTroveboxResponse doInBackground(Void... params)
{
IAccountOpenPhotoApi api = new FakeAccountOpenPhotoApi(
IAccountTroveboxApi api = new FakeAccountTroveboxApi(
activity);
try
{
@ -120,7 +122,7 @@ public class AccountSignup extends CommonActivity
}
@Override
protected void onPostExecute(AccountOpenPhotoResponse result)
protected void onPostExecute(AccountTroveboxResponse result)
{
try
{

View file

@ -1,23 +1,25 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.bitmapfun.util.ImageFetcher;
import me.openphoto.android.app.common.CommonFrargmentWithImageWorker;
import me.openphoto.android.app.model.Album;
import me.openphoto.android.app.net.AlbumsResponse;
import me.openphoto.android.app.net.IOpenPhotoApi;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.ui.adapter.EndlessAdapter;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GalleryOpenControl;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.bitmapfun.util.ImageFetcher;
import com.trovebox.android.app.common.CommonFrargmentWithImageWorker;
import com.trovebox.android.app.model.Album;
import com.trovebox.android.app.net.AlbumsResponse;
import com.trovebox.android.app.net.ITroveboxApi;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.ui.adapter.EndlessAdapter;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GalleryOpenControl;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
@ -95,12 +97,12 @@ public class AlbumsFragment extends CommonFrargmentWithImageWorker implements
private class AlbumsAdapter extends EndlessAdapter<Album>
{
private final IOpenPhotoApi mOpenPhotoApi;
private final ITroveboxApi mTroveboxApi;
public AlbumsAdapter()
{
super(Integer.MAX_VALUE);
mOpenPhotoApi = Preferences.getApi(getActivity());
mTroveboxApi = Preferences.getApi(getActivity());
loadFirstPage();
}
@ -146,7 +148,7 @@ public class AlbumsFragment extends CommonFrargmentWithImageWorker implements
{
try
{
AlbumsResponse response = mOpenPhotoApi.getAlbums();
AlbumsResponse response = mTroveboxApi.getAlbums();
return new LoadResponse(response.getAlbums(), false);
} catch (Exception e)
{

View file

@ -1,23 +1,10 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import me.openphoto.android.app.common.CommonStyledDialogFragment;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoadingControlWithCounter;
import me.openphoto.android.app.util.RunnableWithParameter;
import me.openphoto.android.app.util.SimpleAsyncTaskEx;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
@ -35,6 +22,20 @@ import android.widget.EditText;
import android.widget.TextView;
import com.facebook.android.Facebook;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonStyledDialogFragment;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoadingControlWithCounter;
import com.trovebox.android.app.util.RunnableWithParameter;
import com.trovebox.android.app.util.SimpleAsyncTaskEx;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
/**
* @author Eugene Popovich
@ -262,7 +263,7 @@ public class FacebookFragment extends CommonStyledDialogFragment
try
{
sharePhoto(messageEt.getText().toString(), photo, thumbSize,
OpenPhotoApplication.getContext());
TroveboxApplication.getContext());
return true;
} catch (Exception ex)
{

View file

@ -1,25 +1,27 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.bitmapfun.util.ImageFetcher;
import me.openphoto.android.app.common.CommonRefreshableFragmentWithImageWorker;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.ui.adapter.PhotosEndlessAdapter;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.ImageFlowUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.Utils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.bitmapfun.util.ImageFetcher;
import com.trovebox.android.app.common.CommonRefreshableFragmentWithImageWorker;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.ui.adapter.PhotosEndlessAdapter;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.ImageFlowUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.Utils;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;

View file

@ -1,33 +1,10 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.util.Date;
import java.util.List;
import java.util.Stack;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.bitmapfun.util.ImageFetcher;
import me.openphoto.android.app.common.CommonRefreshableFragmentWithImageWorker;
import me.openphoto.android.app.facebook.FacebookBaseDialogListener;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import me.openphoto.android.app.net.OpenPhotoApi;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.share.ShareUtils;
import me.openphoto.android.app.share.ShareUtils.FacebookShareRunnable;
import me.openphoto.android.app.share.ShareUtils.TwitterShareRunnable;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.ui.adapter.PhotosEndlessAdapter;
import me.openphoto.android.app.ui.widget.AspectRatioImageView;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.RunnableWithParameter;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
@ -50,6 +27,30 @@ import android.widget.TextView;
import com.actionbarsherlock.view.ContextMenu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.bitmapfun.util.ImageFetcher;
import com.trovebox.android.app.common.CommonRefreshableFragmentWithImageWorker;
import com.trovebox.android.app.facebook.FacebookBaseDialogListener;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import com.trovebox.android.app.net.TroveboxApi;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.share.ShareUtils;
import com.trovebox.android.app.share.ShareUtils.FacebookShareRunnable;
import com.trovebox.android.app.share.ShareUtils.TwitterShareRunnable;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.ui.adapter.PhotosEndlessAdapter;
import com.trovebox.android.app.ui.widget.AspectRatioImageView;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.RunnableWithParameter;
import com.trovebox.android.app.util.TrackerUtils;
public class HomeFragment extends CommonRefreshableFragmentWithImageWorker
implements PhotoDeletedHandler, PhotoUpdatedHandler
@ -275,7 +276,7 @@ public class HomeFragment extends CommonRefreshableFragmentWithImageWorker
public NewestPhotosAdapter(Context context)
{
super(context, 25, null, null, OpenPhotoApi.NEWEST_PHOTO_SORT_ORDER, returnSizes);
super(context, 25, null, null, TroveboxApi.NEWEST_PHOTO_SORT_ORDER, returnSizes);
}
@Override

View file

@ -1,34 +1,10 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import me.openphoto.android.app.FacebookFragment.FacebookLoadingControlAccessor;
import me.openphoto.android.app.SyncFragment.SyncHandler;
import me.openphoto.android.app.TwitterFragment.TwitterLoadingControlAccessor;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.common.Refreshable;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import me.openphoto.android.app.provider.UploadsUtils;
import me.openphoto.android.app.provider.UploadsUtils.UploadsClearedHandler;
import me.openphoto.android.app.service.UploaderService;
import me.openphoto.android.app.service.UploaderServiceUtils;
import me.openphoto.android.app.service.UploaderServiceUtils.PhotoUploadedHandler;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.util.BackKeyControl;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GalleryOpenControl;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.SyncUtils;
import me.openphoto.android.app.util.SyncUtils.SyncStartedHandler;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.Utils;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -46,6 +22,31 @@ import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
import com.trovebox.android.app.R;
import com.trovebox.android.app.FacebookFragment.FacebookLoadingControlAccessor;
import com.trovebox.android.app.SyncFragment.SyncHandler;
import com.trovebox.android.app.TwitterFragment.TwitterLoadingControlAccessor;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.common.Refreshable;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import com.trovebox.android.app.provider.UploadsUtils;
import com.trovebox.android.app.provider.UploadsUtils.UploadsClearedHandler;
import com.trovebox.android.app.service.UploaderService;
import com.trovebox.android.app.service.UploaderServiceUtils;
import com.trovebox.android.app.service.UploaderServiceUtils.PhotoUploadedHandler;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.util.BackKeyControl;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GalleryOpenControl;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.SyncUtils;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.Utils;
import com.trovebox.android.app.util.SyncUtils.SyncStartedHandler;
public class MainActivity extends CommonActivity
implements LoadingControl, GalleryOpenControl, SyncHandler,
@ -82,9 +83,9 @@ public class MainActivity extends CommonActivity
// we need to use different theme for embed tabs because of where
// are no over way to use different tab text colors for embed and
// split states
if (Utils.isActionBarTabsEmbeded(OpenPhotoApplication.getContext()))
if (Utils.isActionBarTabsEmbeded(TroveboxApplication.getContext()))
{
setTheme(R.style.Theme_OpenPhoto_Light_Stacked);
setTheme(R.style.Theme_Trovebox_Light_Stacked);
}
super.onCreate(savedInstanceState);
instanceSaved = false;

View file

@ -1,42 +1,10 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.FacebookFragment.FacebookLoadingControlAccessor;
import me.openphoto.android.app.TwitterFragment.TwitterLoadingControlAccessor;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.bitmapfun.util.ImageFetcher;
import me.openphoto.android.app.bitmapfun.util.ImageWorker;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.common.CommonFrargmentWithImageWorker;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import me.openphoto.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.share.ShareUtils;
import me.openphoto.android.app.share.ShareUtils.TwitterShareRunnable;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.ui.adapter.PhotosEndlessAdapter;
import me.openphoto.android.app.ui.adapter.PhotosEndlessAdapter.DetailsReturnSizes;
import me.openphoto.android.app.ui.adapter.PhotosEndlessAdapter.ParametersHolder;
import me.openphoto.android.app.ui.widget.HorizontalListView;
import me.openphoto.android.app.ui.widget.HorizontalListView.OnDownListener;
import me.openphoto.android.app.ui.widget.PhotoViewHackyViewPager;
import me.openphoto.android.app.ui.widget.YesNoDialogFragment;
import me.openphoto.android.app.ui.widget.YesNoDialogFragment.YesNoButtonPressedHandler;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoadingControlWithCounter;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.RunnableWithParameter;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
@ -70,6 +38,39 @@ import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
import com.trovebox.android.app.R;
import com.trovebox.android.app.FacebookFragment.FacebookLoadingControlAccessor;
import com.trovebox.android.app.TwitterFragment.TwitterLoadingControlAccessor;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.bitmapfun.util.ImageFetcher;
import com.trovebox.android.app.bitmapfun.util.ImageWorker;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.common.CommonFrargmentWithImageWorker;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoDeletedHandler;
import com.trovebox.android.app.model.utils.PhotoUtils.PhotoUpdatedHandler;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.share.ShareUtils;
import com.trovebox.android.app.share.ShareUtils.TwitterShareRunnable;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.ui.adapter.PhotosEndlessAdapter;
import com.trovebox.android.app.ui.adapter.PhotosEndlessAdapter.DetailsReturnSizes;
import com.trovebox.android.app.ui.adapter.PhotosEndlessAdapter.ParametersHolder;
import com.trovebox.android.app.ui.widget.HorizontalListView;
import com.trovebox.android.app.ui.widget.PhotoViewHackyViewPager;
import com.trovebox.android.app.ui.widget.YesNoDialogFragment;
import com.trovebox.android.app.ui.widget.HorizontalListView.OnDownListener;
import com.trovebox.android.app.ui.widget.YesNoDialogFragment.YesNoButtonPressedHandler;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoadingControlWithCounter;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.RunnableWithParameter;
import com.trovebox.android.app.util.TrackerUtils;
/**
* The general photo viewing screen

View file

@ -1,17 +1,19 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonStyledDialogFragment;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.model.utils.PhotoUtils;
import me.openphoto.android.app.model.utils.TagUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.Dialog;
import org.holoeverywhere.widget.Switch;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonStyledDialogFragment;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.model.utils.PhotoUtils;
import com.trovebox.android.app.model.utils.TagUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

View file

@ -1,9 +1,6 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.net.IOpenPhotoApi;
import me.openphoto.android.app.net.OpenPhotoApi;
import me.openphoto.android.app.util.CommonUtils;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.basic.DefaultOAuthProvider;
@ -11,6 +8,11 @@ import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import org.holoeverywhere.preference.PreferenceManager;
import com.trovebox.android.app.R;
import com.trovebox.android.app.net.ITroveboxApi;
import com.trovebox.android.app.net.TroveboxApi;
import com.trovebox.android.app.util.CommonUtils;
import android.content.Context;
import android.content.SharedPreferences;
@ -20,15 +22,15 @@ public class Preferences {
public static SharedPreferences getDefaultSharedPreferences(Context context)
{
return PreferenceManager.wrap(OpenPhotoApplication.getContext() == null ? context
: OpenPhotoApplication.getContext(),
return PreferenceManager.wrap(TroveboxApplication.getContext() == null ? context
: TroveboxApplication.getContext(),
PREFERENCES_NAME,
PREFERENCES_MODE);
}
public static SharedPreferences getSharedPreferences(String name)
{
return PreferenceManager.wrap(OpenPhotoApplication.getContext(),
return PreferenceManager.wrap(TroveboxApplication.getContext(),
name,
PREFERENCES_MODE);
}
@ -162,7 +164,7 @@ public class Preferences {
return consumer;
}
public static IOpenPhotoApi getApi(Context context) {
return OpenPhotoApi.createInstance(context);
public static ITroveboxApi getApi(Context context) {
return TroveboxApi.createInstance(context);
}
}

View file

@ -1,22 +1,24 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.model.Tag;
import me.openphoto.android.app.model.utils.TagUtils;
import me.openphoto.android.app.ui.adapter.MultiSelectTagsAdapter;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.compare.ToStringComparator;
import org.holoeverywhere.LayoutInflater;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.model.Tag;
import com.trovebox.android.app.model.utils.TagUtils;
import com.trovebox.android.app.ui.adapter.MultiSelectTagsAdapter;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.compare.ToStringComparator;
import android.content.Context;
import android.content.Intent;
import android.database.DataSetObserver;

View file

@ -1,7 +1,8 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import com.trovebox.android.app.common.CommonPreferenceActivity;
import me.openphoto.android.app.common.CommonPreferenceActivity;
import android.os.Bundle;
/**

View file

@ -1,16 +1,6 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.facebook.FacebookSessionEvents;
import me.openphoto.android.app.facebook.FacebookSessionEvents.LogoutListener;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.provider.UploadsUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.SimpleAsyncTaskEx;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.AlertDialog;
@ -20,6 +10,18 @@ import org.holoeverywhere.preference.Preference.OnPreferenceChangeListener;
import org.holoeverywhere.preference.Preference.OnPreferenceClickListener;
import org.holoeverywhere.preference.PreferenceCategory;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.facebook.FacebookSessionEvents;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.facebook.FacebookSessionEvents.LogoutListener;
import com.trovebox.android.app.provider.UploadsUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.SimpleAsyncTaskEx;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.DialogInterface;
public class SettingsCommon implements
@ -50,7 +52,7 @@ public class SettingsCommon implements
{
// confirm if user wants to log out
new AlertDialog.Builder(activity, R.style.Theme_OpenPhoto_Dialog_Light)
new AlertDialog.Builder(activity, R.style.Theme_Trovebox_Dialog_Light)
.setTitle(R.string.logOut)
.setMessage(R.string.areYouSureQuestion)
.setIcon(android.R.drawable.ic_dialog_alert)
@ -238,7 +240,7 @@ public class SettingsCommon implements
public boolean onPreferenceClick(Preference preference)
{
// confirm if user wants to clear sync information
new AlertDialog.Builder(activity, R.style.Theme_OpenPhoto_Dialog_Light)
new AlertDialog.Builder(activity, R.style.Theme_Trovebox_Dialog_Light)
.setTitle(R.string.sync_clear)
.setMessage(R.string.areYouSureQuestion)
.setIcon(android.R.drawable.ic_dialog_alert)

View file

@ -1,10 +1,12 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonPreferenceFragment;
import org.holoeverywhere.preference.PreferenceCategory;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonPreferenceFragment;
import android.os.Bundle;
/**

View file

@ -1,17 +1,19 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.oauth.OAuthUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.regex.Patterns;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.ProgressDialog;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.oauth.OAuthUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.regex.Patterns;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

View file

@ -1,8 +1,10 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import com.trovebox.android.app.R;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
@ -41,7 +43,7 @@ public class SplashActivity extends Activity {
*/
private class InitialLoad extends AsyncTaskEx<Void, Void, Void> {
/**
* @see me.openphoto.android.app.util.concurrent.AsyncTaskEx#doInBackground(Params[])
* @see com.trovebox.android.app.util.concurrent.AsyncTaskEx#doInBackground(Params[])
*/
@Override
protected Void doInBackground(Void... params) {
@ -56,7 +58,7 @@ public class SplashActivity extends Activity {
}
/**
* @see me.openphoto.android.app.util.concurrent.AsyncTaskEx#onPostExecute(java.lang.Object)
* @see com.trovebox.android.app.util.concurrent.AsyncTaskEx#onPostExecute(java.lang.Object)
*/
@Override
protected void onPostExecute(Void result) {

View file

@ -1,19 +1,21 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.SyncImageSelectionFragment.NextStepFlow;
import me.openphoto.android.app.SyncUploadFragment.PreviousStepFlow;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.provider.UploadsUtils.UploadsClearedHandler;
import me.openphoto.android.app.util.BackKeyControl;
import me.openphoto.android.app.util.CommonUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.R;
import com.trovebox.android.app.SyncImageSelectionFragment.NextStepFlow;
import com.trovebox.android.app.SyncUploadFragment.PreviousStepFlow;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.provider.UploadsUtils.UploadsClearedHandler;
import com.trovebox.android.app.util.BackKeyControl;
import com.trovebox.android.app.util.CommonUtils;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.io.Serializable;
import java.util.ArrayList;
@ -9,17 +9,6 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import me.openphoto.android.app.bitmapfun.util.ImageCache;
import me.openphoto.android.app.bitmapfun.util.ImageFileSystemFetcher;
import me.openphoto.android.app.bitmapfun.util.ImageResizer;
import me.openphoto.android.app.bitmapfun.util.ImageWorker.ImageWorkerAdapter;
import me.openphoto.android.app.common.CommonRefreshableFragmentWithImageWorker;
import me.openphoto.android.app.provider.UploadsProviderAccessor;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
@ -47,6 +36,19 @@ import android.widget.ImageView;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageCache;
import com.trovebox.android.app.bitmapfun.util.ImageFileSystemFetcher;
import com.trovebox.android.app.bitmapfun.util.ImageResizer;
import com.trovebox.android.app.bitmapfun.util.ImageWorker.ImageWorkerAdapter;
import com.trovebox.android.app.common.CommonRefreshableFragmentWithImageWorker;
import com.trovebox.android.app.provider.UploadsProviderAccessor;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
public class SyncImageSelectionFragment extends CommonRefreshableFragmentWithImageWorker
{
@ -793,7 +795,7 @@ public class SyncImageSelectionFragment extends CommonRefreshableFragmentWithIma
MediaStore.Images.Media._ID,
MediaStore.Images.Media.DATA
};
Cursor cursor = OpenPhotoApplication.getContext().getContentResolver().query(
Cursor cursor = TroveboxApplication.getContext().getContentResolver().query(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
projection, // Which columns to return
null, // Return all rows
@ -827,7 +829,7 @@ public class SyncImageSelectionFragment extends CommonRefreshableFragmentWithIma
public void loadProcessedValues()
{
UploadsProviderAccessor uploads = new UploadsProviderAccessor(
OpenPhotoApplication.getContext());
TroveboxApplication.getContext());
List<String> fileNames = uploads
.getUploadedOrPendingPhotosFileNames();
processedValues = new TreeSet<String>(fileNames);

View file

@ -1,26 +1,28 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.io.File;
import java.util.ArrayList;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.net.UploadMetaData;
import me.openphoto.android.app.provider.UploadsProviderAccessor;
import me.openphoto.android.app.service.UploaderService;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.SyncUtils;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.widget.Switch;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.net.UploadMetaData;
import com.trovebox.android.app.provider.UploadsProviderAccessor;
import com.trovebox.android.app.service.UploaderService;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.SyncUtils;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@ -200,7 +202,7 @@ public class SyncUploadFragment extends CommonFragment
try
{
UploadsProviderAccessor uploads = new UploadsProviderAccessor(
OpenPhotoApplication.getContext());
TroveboxApplication.getContext());
UploadMetaData metaData = new UploadMetaData();
metaData.setTitle(editTitle
.getText().toString());
@ -219,8 +221,8 @@ public class SyncUploadFragment extends CommonFragment
metaData, shareOnTwitter,
shareOnFacebook);
}
OpenPhotoApplication.getContext().startService(
new Intent(OpenPhotoApplication.getContext(),
TroveboxApplication.getContext().startService(
new Intent(TroveboxApplication.getContext(),
UploaderService.class));
return true;
} catch (Exception e)

View file

@ -1,17 +1,19 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.model.Tag;
import me.openphoto.android.app.ui.adapter.MultiSelectTagsAdapter;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GalleryOpenControl;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.model.Tag;
import com.trovebox.android.app.ui.adapter.MultiSelectTagsAdapter;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GalleryOpenControl;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent;

View file

@ -1,24 +1,26 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import org.holoeverywhere.app.Application;
import org.holoeverywhere.app.Application.Config.PreferenceImpl;
import com.trovebox.android.app.R;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import android.content.Context;
/**
* @author Eugene Popovich
*/
public class OpenPhotoApplication extends Application
public class TroveboxApplication extends Application
{
static final String TAG = OpenPhotoApplication.class.getSimpleName();
private static OpenPhotoApplication instance;
static final String TAG = TroveboxApplication.class.getSimpleName();
private static TroveboxApplication instance;
public OpenPhotoApplication()
public TroveboxApplication()
{
instance = this;
}

View file

@ -1,22 +1,24 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import me.openphoto.android.app.common.CommonStyledDialogFragment;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.twitter.TwitterProvider;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoadingControlWithCounter;
import me.openphoto.android.app.util.SimpleAsyncTaskEx;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.Dialog;
import org.holoeverywhere.widget.ProgressBar;
import com.trovebox.android.app.R;
import com.trovebox.android.app.common.CommonStyledDialogFragment;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.twitter.TwitterProvider;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoadingControlWithCounter;
import com.trovebox.android.app.util.SimpleAsyncTaskEx;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import twitter4j.StatusUpdate;
import twitter4j.Twitter;
import twitter4j.TwitterException;

View file

@ -1,29 +1,11 @@
package me.openphoto.android.app;
package com.trovebox.android.app;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.Date;
import me.openphoto.android.app.bitmapfun.util.ImageResizer;
import me.openphoto.android.app.common.CommonActivity;
import me.openphoto.android.app.common.CommonClosableOnRestoreDialogFragment;
import me.openphoto.android.app.common.CommonFragment;
import me.openphoto.android.app.facebook.FacebookProvider;
import me.openphoto.android.app.facebook.FacebookUtils;
import me.openphoto.android.app.feather.FeatherFragment;
import me.openphoto.android.app.net.UploadMetaData;
import me.openphoto.android.app.provider.PhotoUpload;
import me.openphoto.android.app.provider.UploadsProviderAccessor;
import me.openphoto.android.app.service.UploaderService;
import me.openphoto.android.app.twitter.TwitterUtils;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.FileUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.ImageUtils;
import me.openphoto.android.app.util.ProgressDialogLoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.AlertDialog;
@ -31,6 +13,26 @@ import org.holoeverywhere.app.Dialog;
import org.holoeverywhere.app.Fragment;
import org.holoeverywhere.widget.Switch;
import com.trovebox.android.app.R;
import com.trovebox.android.app.bitmapfun.util.ImageResizer;
import com.trovebox.android.app.common.CommonActivity;
import com.trovebox.android.app.common.CommonClosableOnRestoreDialogFragment;
import com.trovebox.android.app.common.CommonFragment;
import com.trovebox.android.app.facebook.FacebookProvider;
import com.trovebox.android.app.facebook.FacebookUtils;
import com.trovebox.android.app.feather.FeatherFragment;
import com.trovebox.android.app.net.UploadMetaData;
import com.trovebox.android.app.provider.PhotoUpload;
import com.trovebox.android.app.provider.UploadsProviderAccessor;
import com.trovebox.android.app.service.UploaderService;
import com.trovebox.android.app.twitter.TwitterUtils;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.FileUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.ImageUtils;
import com.trovebox.android.app.util.ProgressDialogLoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
@ -48,7 +50,7 @@ import android.widget.EditText;
import android.widget.ImageView;
/**
* This activity handles uploading pictures to OpenPhoto.
* This activity handles uploading pictures to Trovebox.
*
* @author Patrick Boos
*/
@ -337,7 +339,7 @@ public class UploadActivity extends CommonActivity {
CommonUtils.debug(TAG, "Removing empty gallery entry: " + fileUri);
TrackerUtils.trackBackgroundEvent("removeGalleryEntryForCurrentFile", TAG);
// #271 fix, using another context instead of getActivity()
int rowsDeleted = OpenPhotoApplication.getContext().getContentResolver()
int rowsDeleted = TroveboxApplication.getContext().getContentResolver()
.delete(fileUri, null, null);
CommonUtils.debug(TAG, "Rows deleted:" + rowsDeleted);
@ -359,7 +361,7 @@ public class UploadActivity extends CommonActivity {
values.put(MediaStore.Images.Media.WIDTH, options.outWidth);
values.put(MediaStore.Images.Media.HEIGHT, options.outHeight);
// #271 fix, using another context instead of getActivity()
int rowsUpdated = OpenPhotoApplication.getContext().getContentResolver()
int rowsUpdated = TroveboxApplication.getContext().getContentResolver()
.update(fileUri, values, null, null);
CommonUtils.debug(TAG, "Rows updated:" + rowsUpdated);
}
@ -657,7 +659,7 @@ public class UploadActivity extends CommonActivity {
};
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
R.style.Theme_OpenPhoto_Dialog_Light);
R.style.Theme_Trovebox_Dialog_Light);
builder.setTitle(R.string.upload_title);
builder.setItems(items, new DialogInterface.OnClickListener() {
@Override

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.BufferedOutputStream;
import java.io.File;
@ -30,10 +30,11 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.TrackerUtils;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;

View file

@ -14,14 +14,15 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.File;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.OpenPhotoApplication;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.TroveboxApplication;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.app.ActivityManager;
import android.content.Context;
import android.graphics.Bitmap;
@ -275,7 +276,7 @@ public class ImageCache {
public static void clearDiskCaches()
{
DiskLruCache.clearCaches(OpenPhotoApplication.getContext(),
DiskLruCache.clearCaches(TroveboxApplication.getContext(),
THUMBS_CACHE_DIR, LOCAL_THUMBS_CACHE_DIR,
LARGE_IMAGES_CACHE_DIR, ImageFetcher.HTTP_CACHE_DIR);
}

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@ -25,12 +25,13 @@ import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.R;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.R;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.Log;

View file

@ -1,11 +1,12 @@
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.File;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.LoadingControl;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.LoadingControl;
import android.content.Context;
import android.graphics.Bitmap;

View file

@ -14,18 +14,19 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;

View file

@ -14,16 +14,17 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.lang.ref.WeakReference;
import me.openphoto.android.app.BuildConfig;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.TrackerUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import com.trovebox.android.app.BuildConfig;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.TrackerUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.util.HashMap;
import java.util.Map;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.openphoto.android.app.bitmapfun.util;
package com.trovebox.android.app.bitmapfun.util;
import java.io.File;

View file

@ -1,10 +1,11 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.app.Activity;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.os.Bundle;
/**

View file

@ -1,4 +1,4 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import android.os.Bundle;

View file

@ -1,14 +1,15 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.Dialog;
import org.holoeverywhere.app.DialogFragment;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;

View file

@ -1,16 +1,17 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import java.io.Serializable;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.RunnableWithResult;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.Fragment;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.RunnableWithResult;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

View file

@ -1,10 +1,11 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.bitmapfun.util.ImageWorker;
import com.trovebox.android.app.bitmapfun.util.ImageWorker;
import android.os.Bundle;
/**

View file

@ -1,10 +1,11 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.preference.PreferenceActivity;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.os.Bundle;
/**

View file

@ -1,13 +1,14 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.preference.PreferenceFragment;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

View file

@ -1,12 +1,12 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import me.openphoto.android.app.R;
import android.os.Bundle;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.trovebox.android.app.R;
/**
* Abstract fragment with the refresh menu available

View file

@ -1,8 +1,9 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
import com.trovebox.android.app.R;
import com.trovebox.android.app.util.GuiUtils;
import me.openphoto.android.app.R;
import me.openphoto.android.app.util.GuiUtils;
import android.os.Bundle;
/**
@ -21,7 +22,7 @@ public class CommonStyledDialogFragment extends CommonDialogFragment
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setStyle(STYLE_NORMAL, R.style.Theme_OpenPhoto_Dialog_Light);
setStyle(STYLE_NORMAL, R.style.Theme_Trovebox_Dialog_Light);
setDialogType(DialogType.AlertDialog);
}

View file

@ -1,4 +1,4 @@
package me.openphoto.android.app.common;
package com.trovebox.android.app.common;
public interface Refreshable {
void refresh();

View file

@ -1,12 +1,12 @@
package me.openphoto.android.app.facebook;
package com.trovebox.android.app.facebook;
import me.openphoto.android.app.util.GuiUtils;
import android.content.Context;
import com.facebook.android.DialogError;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;
import com.trovebox.android.app.util.GuiUtils;
/**
* Skeleton base class for RequestListeners, providing default error handling.

View file

@ -1,15 +1,15 @@
package me.openphoto.android.app.facebook;
package com.trovebox.android.app.facebook;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import me.openphoto.android.app.util.GuiUtils;
import android.content.Context;
import com.facebook.android.AsyncFacebookRunner.RequestListener;
import com.facebook.android.FacebookError;
import com.trovebox.android.app.util.GuiUtils;
/**
* Skeleton base class for RequestListeners, providing default error handling.

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.facebook;
package com.trovebox.android.app.facebook;
import android.content.Context;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.openphoto.android.app.facebook;
package com.trovebox.android.app.facebook;
import java.util.LinkedList;

View file

@ -1,13 +1,6 @@
package me.openphoto.android.app.facebook;
package com.trovebox.android.app.facebook;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.R;
import me.openphoto.android.app.facebook.FacebookSessionEvents.AuthListener;
import me.openphoto.android.app.facebook.FacebookSessionEvents.LogoutListener;
import me.openphoto.android.app.ui.widget.YesNoDialogFragment;
import me.openphoto.android.app.ui.widget.YesNoDialogFragment.YesNoButtonPressedHandler;
import me.openphoto.android.app.util.GuiUtils;
import org.holoeverywhere.app.Activity;
@ -24,6 +17,13 @@ import com.facebook.android.DialogError;
import com.facebook.android.Facebook;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.R;
import com.trovebox.android.app.facebook.FacebookSessionEvents.AuthListener;
import com.trovebox.android.app.facebook.FacebookSessionEvents.LogoutListener;
import com.trovebox.android.app.ui.widget.YesNoDialogFragment;
import com.trovebox.android.app.ui.widget.YesNoDialogFragment.YesNoButtonPressedHandler;
import com.trovebox.android.app.util.GuiUtils;
/**
* @author Eugene Popovich

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.feather;
package com.trovebox.android.app.feather;
import java.io.File;
import java.io.FileNotFoundException;
@ -7,10 +7,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import me.openphoto.android.app.OpenPhotoApplication;
import me.openphoto.android.app.R;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import org.holoeverywhere.app.Fragment;
import org.holoeverywhere.app.ProgressDialog;
@ -47,6 +43,10 @@ import com.aviary.android.feather.library.utils.IOUtils;
import com.aviary.android.feather.library.utils.ImageLoader.ImageSizes;
import com.aviary.android.feather.library.utils.StringUtils;
import com.aviary.android.feather.library.utils.SystemUtils;
import com.trovebox.android.app.TroveboxApplication;
import com.trovebox.android.app.R;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
/**
* The feather editor support fragment. It is used as external util to open
@ -157,7 +157,7 @@ public class FeatherFragment extends Fragment {
@SuppressLint("NewApi")
private void updateMedia(String filepath) {
CommonUtils.debug(TAG, "updateMedia: " + filepath);
MediaScannerConnection.scanFile(OpenPhotoApplication.getContext(),
MediaScannerConnection.scanFile(TroveboxApplication.getContext(),
new String[] {
filepath
}, null, null);
@ -274,12 +274,12 @@ public class FeatherFragment extends Fragment {
task.execute(cursor);
} else {
throw new IllegalStateException(
OpenPhotoApplication.getContext().getString(
TroveboxApplication.getContext().getString(
R.string.feather_failed_to_retrieve_the_list_of_acitions));
}
} else {
throw new IllegalStateException(
OpenPhotoApplication.getContext().getString(
TroveboxApplication.getContext().getString(
R.string.feather_failed_to_retrieve_the_session_information));
}
@ -453,7 +453,7 @@ public class FeatherFragment extends Fragment {
// be unique for every new instance of Feather )
// The session-id key must be 64 char length
String API_KEY = OpenPhotoApplication.getContext().getString(R.string.feather_api_key);
String API_KEY = TroveboxApplication.getContext().getString(R.string.feather_api_key);
mSessionId = StringUtils.getSha256(System.currentTimeMillis() + API_KEY);
CommonUtils.debug(TAG,
"session: " + mSessionId + ", size: " + mSessionId.length());
@ -516,7 +516,7 @@ public class FeatherFragment extends Fragment {
ContentResolver getContentResolver()
{
return OpenPhotoApplication.getContext().getContentResolver();
return TroveboxApplication.getContext().getContentResolver();
}
/**
@ -597,7 +597,7 @@ public class FeatherFragment extends Fragment {
progress = new ProgressDialog(getCallingFragment().getActivity());
progress.setIndeterminate(true);
progress.setCancelable(true);
progress.setMessage(OpenPhotoApplication.getContext().getString(
progress.setMessage(TroveboxApplication.getContext().getString(
R.string.feather_loading_image));
progress.setOnCancelListener(this);
progress.show();
@ -619,7 +619,7 @@ public class FeatherFragment extends Fragment {
// final int w = mImageContainer.getWidth();
// CommonUtils.debug(TAG, "width: " + w);
ImageSizes sizes = new ImageSizes();
bitmap = DecodeUtils.decode(OpenPhotoApplication.getContext(), mUri, imageWidth,
bitmap = DecodeUtils.decode(TroveboxApplication.getContext(), mUri, imageWidth,
imageHeight, sizes);
return bitmap;
}
@ -636,7 +636,7 @@ public class FeatherFragment extends Fragment {
if (result != null) {
setImageBitmap(result);
} else {
GuiUtils.alert(OpenPhotoApplication.getContext().getString(
GuiUtils.alert(TroveboxApplication.getContext().getString(
R.string.feather_failed_to_load_image, mUri.toString()));
}
} finally
@ -718,7 +718,7 @@ public class FeatherFragment extends Fragment {
progress_ = new ProgressDialog(getCallingFragment().getActivity());
progress_.setIndeterminate(true);
progress_.setTitle(R.string.feather_processing_hi_res_image);
progress_.setMessage(OpenPhotoApplication.getContext().getString(
progress_.setMessage(TroveboxApplication.getContext().getString(
R.string.feather_loading_image));
progress_.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progress_.setCancelable(false);
@ -735,10 +735,10 @@ public class FeatherFragment extends Fragment {
String message = "";
if (index == -1)
message = OpenPhotoApplication.getContext()
message = TroveboxApplication.getContext()
.getString(R.string.feather_saving_image);
else
message = OpenPhotoApplication.getContext().getString(
message = TroveboxApplication.getContext().getString(
R.string.feather_applying_action, Integer.toString(index + 1),
Integer.toString(total));
@ -891,7 +891,7 @@ public class FeatherFragment extends Fragment {
// in case we had an error...
if (result != Error.NoError) {
GuiUtils.alert(OpenPhotoApplication.getContext().getString(
GuiUtils.alert(TroveboxApplication.getContext().getString(
R.string.feather_error_occurred, result.name()));
return;
}
@ -926,7 +926,7 @@ public class FeatherFragment extends Fragment {
private Error loadImage(MoaHD moa) {
MoaHD.Error result = Error.UnknownError;
final String srcPath = IOUtils.getRealFilePath(OpenPhotoApplication.getContext(), uri_);
final String srcPath = IOUtils.getRealFilePath(TroveboxApplication.getContext(), uri_);
if (srcPath != null) {
// Let's try to load the EXIF tags from

View file

@ -1,11 +1,11 @@
package me.openphoto.android.app.model;
package com.trovebox.android.app.model;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Class representing a Album on OpenPhoto.
* Class representing a Album on Trovebox.
*
* @author Eugene Popovich
*/
@ -23,7 +23,7 @@ public class Album
/**
* Creates a Album object from json.
*
* @param json JSONObject of the Album as received from the OpenPhoto API
* @param json JSONObject of the Album as received from the Trovebox API
* @return Album as represented in the given json
* @throws JSONException
*/

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.model;
package com.trovebox.android.app.model;
import java.util.ArrayList;
import java.util.Date;
@ -7,18 +7,19 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.TrackerUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.TrackerUtils;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Class representing a Photo on OpenPhoto.
* Class representing a Photo on Trovebox.
*
* @author Patrick Boos
*/
@ -59,7 +60,7 @@ public class Photo implements Parcelable {
/**
* Creates a Photo object from json.
*
* @param json JSONObject of the Photo as received from the OpenPhoto API
* @param json JSONObject of the Photo as received from the Trovebox API
* @return Photo as represented in the given json
* @throws JSONException
*/

View file

@ -1,11 +1,11 @@
package me.openphoto.android.app.model;
package com.trovebox.android.app.model;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Class representing a Tag on OpenPhoto.
* Class representing a Tag on Trovebox.
*
* @author Patrick Boos
*/
@ -23,7 +23,7 @@ public class Tag {
/**
* Creates a Tag object from json.
*
* @param json JSONObject of the Tag as received from the OpenPhoto API
* @param json JSONObject of the Tag as received from the Trovebox API
* @return Tag as represented in the given json
* @throws JSONException
*/

View file

@ -1,25 +1,26 @@
package me.openphoto.android.app.model.utils;
package com.trovebox.android.app.model.utils;
import java.io.IOException;
import java.util.Collection;
import me.openphoto.android.app.OpenPhotoApplication;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.R;
import me.openphoto.android.app.model.Photo;
import me.openphoto.android.app.net.OpenPhotoResponse;
import me.openphoto.android.app.net.PhotoResponse;
import me.openphoto.android.app.net.ReturnSizes;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.RunnableWithParameter;
import me.openphoto.android.app.util.SimpleAsyncTaskEx;
import me.openphoto.android.app.util.TrackerUtils;
import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;
import com.trovebox.android.app.TroveboxApplication;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.R;
import com.trovebox.android.app.model.Photo;
import com.trovebox.android.app.net.TroveboxResponse;
import com.trovebox.android.app.net.PhotoResponse;
import com.trovebox.android.app.net.ReturnSizes;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.RunnableWithParameter;
import com.trovebox.android.app.util.SimpleAsyncTaskEx;
import com.trovebox.android.app.util.TrackerUtils;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -33,9 +34,9 @@ import android.content.IntentFilter;
*/
public class PhotoUtils {
public static final String TAG = PhotoUtils.class.getSimpleName();
public static String PHOTO_DELETED_ACTION = "me.openphoto.PHOTO_DELETED";
public static String PHOTO_DELETED_ACTION = "com.trovebox.PHOTO_DELETED";
public static String PHOTO_DELETED = "PHOTO_DELETED";
public static String PHOTO_UPDATED_ACTION = "me.openphoto.PHOTO_UPDATED";
public static String PHOTO_UPDATED_ACTION = "com.trovebox.PHOTO_UPDATED";
public static String PHOTO_UPDATED = "PHOTO_UPDATED";
/**
@ -112,7 +113,7 @@ public class PhotoUtils {
JSONException {
TrackerUtils.trackBackgroundEvent("getThePhotoWithReturnSize", TAG);
long start = System.currentTimeMillis();
PhotoResponse response = Preferences.getApi(OpenPhotoApplication.getContext())
PhotoResponse response = Preferences.getApi(TroveboxApplication.getContext())
.getPhoto(
photo.getId(), photoSize);
photo = response.getPhoto();
@ -195,8 +196,8 @@ public class PhotoUtils {
@Override
protected Boolean doInBackground(Void... params) {
try {
OpenPhotoResponse response =
Preferences.getApi(OpenPhotoApplication.getContext())
TroveboxResponse response =
Preferences.getApi(TroveboxApplication.getContext())
.deletePhoto(photo.getId());
return response.isSuccess();
} catch (Exception e) {
@ -237,7 +238,7 @@ public class PhotoUtils {
protected Boolean doInBackground(Void... params) {
try {
PhotoResponse response =
Preferences.getApi(OpenPhotoApplication.getContext())
Preferences.getApi(TroveboxApplication.getContext())
.updatePhotoDetails(
photo.getId(),
title,
@ -306,7 +307,7 @@ public class PhotoUtils {
{
Intent intent = new Intent(PHOTO_DELETED_ACTION);
intent.putExtra(PHOTO_DELETED, photo);
OpenPhotoApplication.getContext().sendBroadcast(intent);
TroveboxApplication.getContext().sendBroadcast(intent);
}
public static interface PhotoDeletedHandler
@ -358,7 +359,7 @@ public class PhotoUtils {
{
Intent intent = new Intent(PHOTO_UPDATED_ACTION);
intent.putExtra(PHOTO_UPDATED, photo);
OpenPhotoApplication.getContext().sendBroadcast(intent);
TroveboxApplication.getContext().sendBroadcast(intent);
}
public static interface PhotoUpdatedHandler

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.model.utils;
package com.trovebox.android.app.model.utils;
import java.util.Arrays;
import java.util.Collection;

View file

@ -1,19 +1,20 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.model.Album;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.model.Album;
/**
* @author Eugene Popovich
*/
public class AlbumsResponse extends OpenPhotoResponse
public class AlbumsResponse extends TroveboxResponse
{
private final List<Album> mAlbums;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.File;
import java.io.IOException;
@ -7,10 +7,6 @@ import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.net.ApiRequest.Parameter;
import me.openphoto.android.app.net.HttpEntityWithProgress.ProgressListener;
import me.openphoto.android.app.util.GuiUtils;
import oauth.signpost.OAuthConsumer;
import org.apache.http.HttpEntity;
@ -32,6 +28,11 @@ import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.net.ApiRequest.Parameter;
import com.trovebox.android.app.net.HttpEntityWithProgress.ProgressListener;
import com.trovebox.android.app.util.GuiUtils;
import android.content.Context;
/**

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.File;
import java.util.ArrayList;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.BufferedReader;
import java.io.IOException;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.FilterOutputStream;
import java.io.IOException;

View file

@ -1,18 +1,19 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import me.openphoto.android.app.net.HttpEntityWithProgress.ProgressListener;
import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;
import com.trovebox.android.app.net.HttpEntityWithProgress.ProgressListener;
import android.content.Context;
public interface IOpenPhotoApi {
public interface ITroveboxApi {
/**
* @return tags which are used on the server
@ -229,6 +230,6 @@ public interface IOpenPhotoApi {
* @throws IllegalStateException
* @throws JSONException
*/
public OpenPhotoResponse deletePhoto(String photoId) throws ClientProtocolException,
public TroveboxResponse deletePhoto(String photoId) throws ClientProtocolException,
IOException, IllegalStateException, JSONException;
}

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import org.json.JSONArray;
import org.json.JSONException;
@ -10,7 +10,7 @@ import org.json.JSONObject;
*
* @author Patrick Boos
*/
public class PagedResponse extends OpenPhotoResponse {
public class PagedResponse extends TroveboxResponse {
private int mTotalRows;
private int mPageSize;
private int mCurrentPage;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
public class Paging {
private final int mPage;

View file

@ -1,12 +1,13 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import me.openphoto.android.app.model.Photo;
import org.json.JSONException;
import org.json.JSONObject;
public class PhotoResponse extends OpenPhotoResponse {
import com.trovebox.android.app.model.Photo;
public class PhotoResponse extends TroveboxResponse {
private final Photo mPhoto;
public PhotoResponse(JSONObject json) throws JSONException {

View file

@ -1,15 +1,16 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.model.Photo;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.model.Photo;
public class PhotosResponse extends PagedResponse {
private List<Photo> mPhotos;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.util.ArrayList;

View file

@ -1,16 +1,17 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.util.ArrayList;
import java.util.List;
import me.openphoto.android.app.model.Tag;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class TagsResponse extends OpenPhotoResponse {
import com.trovebox.android.app.model.Tag;
public class TagsResponse extends TroveboxResponse {
private final List<Tag> mTags;
public TagsResponse(JSONObject json) throws JSONException {

View file

@ -1,39 +1,40 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.net.HttpEntityWithProgress.ProgressListener;
import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.net.HttpEntityWithProgress.ProgressListener;
import android.content.Context;
/**
* OpenPhotoApi provides access to the acOpenPhoto API.
* TroveboxApi provides access to the acTrovebox API.
*
* @author Patrick Boos
*/
public class OpenPhotoApi extends ApiBase implements IOpenPhotoApi {
public class TroveboxApi extends ApiBase implements ITroveboxApi {
private static IOpenPhotoApi sMock;
private static ITroveboxApi sMock;
public static final String NEWEST_PHOTO_SORT_ORDER = "dateUploaded,DESC";
public static IOpenPhotoApi createInstance(Context context) {
public static ITroveboxApi createInstance(Context context) {
if (sMock != null) {
return sMock;
} else {
return new OpenPhotoApi(context);
return new TroveboxApi(context);
}
}
public OpenPhotoApi(Context context) {
public TroveboxApi(Context context) {
super(context);
}
@ -108,9 +109,9 @@ public class OpenPhotoApi extends ApiBase implements IOpenPhotoApi {
/*
* (non-Javadoc)
* @see
* me.openphoto.android.app.net.IOpenPhotoApi#getPhotos(me.openphoto.android
* com.trovebox.android.app.net.ITroveboxApi#getPhotos(com.trovebox.android
* .app.net.ReturnSize, java.util.Collection,
* me.openphoto.android.app.net.Paging)
* com.trovebox.android.app.net.Paging)
*/
@Override
public PhotosResponse getPhotos(ReturnSizes resize,
@ -181,8 +182,8 @@ public class OpenPhotoApi extends ApiBase implements IOpenPhotoApi {
/*
* (non-Javadoc)
* @see me.openphoto.android.app.net.IOpenPhotoApi#uploadPhoto(java.io.File,
* me.openphoto.android.app.net.UploadMetaData)
* @see com.trovebox.android.app.net.ITroveboxApi#uploadPhoto(java.io.File,
* com.trovebox.android.app.net.UploadMetaData)
*/
@Override
public UploadResponse uploadPhoto(File imageFile, UploadMetaData metaData,
@ -228,10 +229,10 @@ public class OpenPhotoApi extends ApiBase implements IOpenPhotoApi {
* ONLY FOR TESTING! Will make the class return the given Mock when
* accessing createInstance(..)
*
* @param mock Mock to be used for OpenPhotoApi
* @param mock Mock to be used for TroveboxApi
*/
public static void injectMock(IOpenPhotoApi mock) {
OpenPhotoApi.sMock = mock;
public static void injectMock(ITroveboxApi mock) {
TroveboxApi.sMock = mock;
}
@Override
@ -244,14 +245,14 @@ public class OpenPhotoApi extends ApiBase implements IOpenPhotoApi {
}
@Override
public OpenPhotoResponse deletePhoto(String photoId) throws ClientProtocolException,
public TroveboxResponse deletePhoto(String photoId) throws ClientProtocolException,
IOException, IllegalStateException, JSONException
{
ApiRequest request = new ApiRequest(ApiRequest.POST, "/photo/" + photoId
+ "/delete.json");
ApiResponse response = execute(request);
String content = response.getContentAsString();
return new OpenPhotoResponse(new JSONObject(content));
return new TroveboxResponse(new JSONObject(content));
}
@Override

View file

@ -1,14 +1,14 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import org.json.JSONException;
import org.json.JSONObject;
public class OpenPhotoResponse {
public class TroveboxResponse {
private final String mMessage;
private final int mCode;
public OpenPhotoResponse(JSONObject json) throws JSONException {
public TroveboxResponse(JSONObject json) throws JSONException {
mMessage = json.getString("message");
mCode = json.getInt("code");
}

View file

@ -1,7 +1,7 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import me.openphoto.android.app.model.Photo;
import com.trovebox.android.app.model.Photo;
public class UploadMetaData {
private String mTitle;

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net;
package com.trovebox.android.app.net;
import org.json.JSONException;
import org.json.JSONObject;

View file

@ -1,19 +1,20 @@
package me.openphoto.android.app.net.account;
package com.trovebox.android.app.net.account;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.R;
import me.openphoto.android.app.net.OpenPhotoResponse;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.R;
import com.trovebox.android.app.net.TroveboxResponse;
import android.content.Context;
/**
* @author Patrick Santana <patrick@openphoto.me>
* @author Patrick Santana <patrick@trovebox.com>
*/
public class AccountOpenPhotoResponse extends OpenPhotoResponse {
public class AccountTroveboxResponse extends TroveboxResponse {
public static int SUCCESSFUL_CODE = 200;
public static int INVALID_CREDENTIALS_CODE = 403;
public static int UNKNOWN_ERROR_CODE = 500;
@ -72,7 +73,7 @@ public class AccountOpenPhotoResponse extends OpenPhotoResponse {
this.email = email;
}
public AccountOpenPhotoResponse(JSONObject json) throws JSONException {
public AccountTroveboxResponse(JSONObject json) throws JSONException {
super(json);
if (isSuccess() && json.get("result") instanceof JSONObject) {
JSONObject result = json.getJSONObject("result");

View file

@ -1,37 +1,38 @@
package me.openphoto.android.app.net.account;
package com.trovebox.android.app.net.account;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import me.openphoto.android.app.net.ApiBase;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.net.ApiBase;
import android.content.Context;
/**
* @author Patrick Santana <patrick@openphoto.me>
* @author Patrick Santana <patrick@trovebox.com>
*/
public class FakeAccountOpenPhotoApi extends ApiBase implements
IAccountOpenPhotoApi {
public class FakeAccountTroveboxApi extends ApiBase implements
IAccountTroveboxApi {
public FakeAccountOpenPhotoApi(Context context) {
public FakeAccountTroveboxApi(Context context) {
super(context);
}
@Override
public AccountOpenPhotoResponse createNewUser(String user, String email,
public AccountTroveboxResponse createNewUser(String user, String email,
String password) throws IllegalStateException, IOException,
NoSuchAlgorithmException, JSONException {
return createFakeAccountOpenPhotoResponse();
return createFakeAccountTroveboxResponse();
}
@Override
public AccountOpenPhotoResponse signIn(String email, String password)
public AccountTroveboxResponse signIn(String email, String password)
throws IllegalStateException, IOException, NoSuchAlgorithmException, JSONException {
return createFakeAccountOpenPhotoResponse();
return createFakeAccountTroveboxResponse();
}
@Override
@ -39,18 +40,18 @@ public class FakeAccountOpenPhotoApi extends ApiBase implements
return "Please, look your email";
}
private AccountOpenPhotoResponse createFakeAccountOpenPhotoResponse() throws JSONException {
private AccountTroveboxResponse createFakeAccountTroveboxResponse() throws JSONException {
JSONObject jsonObjFake = new JSONObject(
"{\"message\" : \"User credentials\"," +
"\"code\" : 200," +
"\"result\" :" +
"{\"host\":\"apigee.openphoto.me\"," +
"{\"host\":\"apigee.trovebox.com\"," +
"\"id\":\"102230629a6802fbca9825a4617bfe\"," +
"\"clientSecret\":\"0f5d654bca\"," +
"\"userToken\":\"b662440d621f2f71352f8865888fe2\"," +
"\"userSecret\":\"6d1e8fc274\"," +
"\"owner\":\"hello@openphoto.me\"}}");
"\"owner\":\"hello@trovebox.com\"}}");
// JSONObject jsonObjFake = new JSONObject(
// "{\"message\":\"Invalid username or password.\",\"code\":403,\"result\":0}");
// JSONObject jsonObjFake = new JSONObject(
@ -67,6 +68,6 @@ public class FakeAccountOpenPhotoApi extends ApiBase implements
// TODO Auto-generated catch block
e.printStackTrace();
}
return new AccountOpenPhotoResponse(jsonObjFake);
return new AccountTroveboxResponse(jsonObjFake);
}
}

View file

@ -1,5 +1,5 @@
package me.openphoto.android.app.net.account;
package com.trovebox.android.app.net.account;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
@ -7,9 +7,9 @@ import java.security.NoSuchAlgorithmException;
import org.json.JSONException;
/**
* @author Patrick Santana <patrick@openphoto.me>
* @author Patrick Santana <patrick@trovebox.com>
*/
public interface IAccountOpenPhotoApi {
public interface IAccountTroveboxApi {
/**
* Create a user
@ -19,7 +19,7 @@ public interface IAccountOpenPhotoApi {
* @param password password
* @return response with all details on it (credentials)
*/
public AccountOpenPhotoResponse createNewUser(String user, String email,
public AccountTroveboxResponse createNewUser(String user, String email,
String password) throws IllegalStateException, IOException, NoSuchAlgorithmException,
JSONException;
@ -30,7 +30,7 @@ public interface IAccountOpenPhotoApi {
* @param password pwd
* @return response with all details on it (credentials)
*/
public AccountOpenPhotoResponse signIn(String email, String password)
public AccountTroveboxResponse signIn(String email, String password)
throws IllegalStateException, IOException, NoSuchAlgorithmException, JSONException;
/**

View file

@ -1,13 +1,14 @@
package me.openphoto.android.app.oauth;
package com.trovebox.android.app.oauth;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.R;
import com.trovebox.android.app.net.ITroveboxApi;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.LoadingControl;
import com.trovebox.android.app.util.LoginUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.R;
import me.openphoto.android.app.net.IOpenPhotoApi;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.LoadingControl;
import me.openphoto.android.app.util.LoginUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.basic.DefaultOAuthConsumer;
@ -22,7 +23,7 @@ public class OAuthUtils
static String getCallbackUrl(Context context)
{
return context.getString(R.string.openphoto_oauth_callback_url);
return context.getString(R.string.trovebox_oauth_callback_url);
}
/**
@ -35,8 +36,8 @@ public class OAuthUtils
{
try
{
IOpenPhotoApi mOpenPhoto = Preferences.getApi(activity);
String url = mOpenPhoto.getOAuthUrl("OpenPhoto Android App",
ITroveboxApi mTrovebox = Preferences.getApi(activity);
String url = mTrovebox.getOAuthUrl("Trovebox Android App",
getCallbackUrl(activity),
activity);
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri

View file

@ -1,7 +1,8 @@
package me.openphoto.android.app.provider;
package com.trovebox.android.app.provider;
import com.trovebox.android.app.net.UploadMetaData;
import me.openphoto.android.app.net.UploadMetaData;
import android.net.Uri;
public class PhotoUpload {

View file

@ -14,9 +14,10 @@
* limitations under the License.
*/
package me.openphoto.android.app.provider;
package com.trovebox.android.app.provider;
import com.trovebox.android.app.util.CommonUtils;
import me.openphoto.android.app.util.CommonUtils;
import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
@ -33,7 +34,7 @@ import android.text.TextUtils;
public class UploadsProvider extends ContentProvider
{
private static final String packageName = "me.openphoto.android.app";
private static final String packageName = "com.trovebox.android.app";
public static final Uri CONTENT_URI = Uri.parse("content://" + packageName
+ "/uploads");
@ -117,9 +118,9 @@ public class UploadsProvider extends ContentProvider
switch (uriMatcher.match(uri))
{
case UPLOADS:
return "vnd.android.cursor.dir/vnd.openphoto.photo";
return "vnd.android.cursor.dir/vnd.trovebox.photo";
case UPLOAD_ID:
return "vnd.android.cursor.item/vnd.openphoto.photo";
return "vnd.android.cursor.item/vnd.trovebox.photo";
default:
throw new IllegalArgumentException("Unsupported URI: " + uri);
}

View file

@ -1,18 +1,19 @@
package me.openphoto.android.app.provider;
package com.trovebox.android.app.provider;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import me.openphoto.android.app.net.UploadMetaData;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.ImageUtils;
import org.json.JSONException;
import org.json.JSONObject;
import com.trovebox.android.app.net.UploadMetaData;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.ImageUtils;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;

View file

@ -1,11 +1,12 @@
package me.openphoto.android.app.provider;
package com.trovebox.android.app.provider;
import com.trovebox.android.app.TroveboxApplication;
import com.trovebox.android.app.R;
import com.trovebox.android.app.util.CommonUtils;
import com.trovebox.android.app.util.GuiUtils;
import com.trovebox.android.app.util.concurrent.AsyncTaskEx;
import me.openphoto.android.app.OpenPhotoApplication;
import me.openphoto.android.app.R;
import me.openphoto.android.app.util.CommonUtils;
import me.openphoto.android.app.util.GuiUtils;
import me.openphoto.android.app.util.concurrent.AsyncTaskEx;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -15,7 +16,7 @@ import android.content.IntentFilter;
public class UploadsUtils
{
public static final String TAG = UploadsUtils.class.getSimpleName();
public static String BROADCAST_ACTION = "me.openphoto.UPLOADS_CLEARED";
public static String BROADCAST_ACTION = "com.trovebox.UPLOADS_CLEARED";
public static BroadcastReceiver getAndRegisterOnUploadClearedActionBroadcastReceiver(
final String TAG,
@ -46,7 +47,7 @@ public class UploadsUtils
public static void sendUploadsClearedBroadcast()
{
Intent intent = new Intent(BROADCAST_ACTION);
OpenPhotoApplication.getContext().sendBroadcast(intent);
TroveboxApplication.getContext().sendBroadcast(intent);
}
public static void clearUploads()
@ -63,7 +64,7 @@ public class UploadsUtils
try
{
UploadsProviderAccessor uploads = new UploadsProviderAccessor(
OpenPhotoApplication.getContext());
TroveboxApplication.getContext());
uploads.deleteAll();
return true;
} catch (Exception ex)

View file

@ -1,8 +1,9 @@
package me.openphoto.android.app.receiver;
package com.trovebox.android.app.receiver;
import com.trovebox.android.app.service.UploaderService;
import com.trovebox.android.app.util.CommonUtils;
import me.openphoto.android.app.service.UploaderService;
import me.openphoto.android.app.util.CommonUtils;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

View file

@ -1,12 +1,13 @@
package me.openphoto.android.app.service;
package com.trovebox.android.app.service;
import java.io.File;
import me.openphoto.android.app.Preferences;
import me.openphoto.android.app.net.UploadMetaData;
import me.openphoto.android.app.provider.UploadsProviderAccessor;
import me.openphoto.android.app.util.CommonUtils;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.net.UploadMetaData;
import com.trovebox.android.app.provider.UploadsProviderAccessor;
import com.trovebox.android.app.util.CommonUtils;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;

Some files were not shown because too many files have changed in this diff Show more