Skip to content

Commit

Permalink
0.6.11 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Rust committed Apr 3, 2016
1 parent bcab16e commit 7d24005
Show file tree
Hide file tree
Showing 31 changed files with 63 additions and 81 deletions.
6 changes: 6 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.owntracks.android"
android:versionCode="0610"
android:versionName="0.6.10">
android:versionCode="0611"
android:versionName="0.6.11">

<uses-feature
android:name="android.hardware.bluetooth_le"
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
OwnTracks Android App Release Notes
===================================

## OwnTracks 0.6.11
>Release date: 2016-04-03
* [FIX] #350 - visual glitches on 4.0.4
* [FIX] #341 - remove the *map center* button on the *Friends* page
* [FIX] #339 - custom certificates couldn't be imported from certain locations
* [NEW] - Follow mode doesn't work in certain cases. It now auto engages from Friends view and after long pressing on details on map.
* [NEW] - Due to popular demand, regions can be deleted by long pressing them
* [NEW] - Setup wizard that allows to set the mode prior to the first connection

## OwnTracks 0.6.10
>Release date: 2016-03-28 for beta testers
* [FIX] #338 - Bluetooth beacon functionality can cause battery drain
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ dependencies {
compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter-recyclerview:1.0.0'

// Widget libraries
compile 'com.github.curioustechizen.android-ago:library:1.3.0'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile('com.mikepenz:fastadapter:1.1.2@aar') {
transitive = true
Expand All @@ -62,10 +61,10 @@ dependencies {
compile 'com.mikepenz:materialize:0.8.2@aar'
compile 'com.mikepenz:iconics-core:2.5.1@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
compile('com.github.afollestad.material-dialogs:core:0.8.5.5@aar') {
compile('com.github.afollestad.material-dialogs:core:0.8.5.7@aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:commons:0.8.5.5@aar') {
compile('com.github.afollestad.material-dialogs:commons:0.8.5.7@aar') {
transitive = true
}
compile 'com.joanzapata.android:android-iconify:1.0.10'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,6 @@ public void run() {

getSupportLoaderManager().initLoader(LOADER_ID, null, this);

ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) {
public int getSwipeDirs(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
if (!(viewHolder instanceof AdapterWaypoints.ItemViewHolder)) return 0;
return super.getSwipeDirs(recyclerView, viewHolder);
}

@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
return false;
}

@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {
remove(viewHolder.getItemId());
}
};

ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);
itemTouchHelper.attachToRecyclerView(listView);

}

private void requery() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void buildPagerCircles() {

for (int i = 0; i < pagerAdapter.getCount(); i++) {
ImageView circle = new ImageView(this);
circle.setImageResource(R.drawable.ic_fiber_manual_record_white_18dp);
circle.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_fiber_manual_record_white_18dp));
circle.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
circle.setAdjustViewBounds(true);
circle.setPadding(padding, 0, padding, 0);
Expand Down Expand Up @@ -431,6 +431,7 @@ public void onNextClicked() {
public static class PermissionFragment extends ScreenFragment {
public static final int ID = 4;
private static PermissionFragment instance;
private ImageView img;

public static PermissionFragment getInstance() {
if(instance == null)
Expand All @@ -457,6 +458,8 @@ public void onPermissionGranted() {
success.setVisibility(View.VISIBLE);
button.setVisibility(View.GONE);

img.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_assignment_turned_in_white_48dp));

ActivityWelcome.class.cast(getActivity()).enablePagerNext();
}

Expand All @@ -479,8 +482,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

button = (Button) v.findViewById(R.id.button);
success = (TextView) v.findViewById(R.id.message);


img = (ImageView) v.findViewById(R.id.img);

if(!permissionsGranted()) {
onPermissionDenied();
Expand Down Expand Up @@ -510,12 +512,13 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
}

private static class PlayFragment extends ScreenFragment implements DialogInterface.OnCancelListener {
public static class PlayFragment extends ScreenFragment implements DialogInterface.OnCancelListener {
public static final int ID = 3;
private static PlayFragment instance;
private static GoogleApiAvailability googleAPI;
private Button button;
private TextView message;
private ImageView img;

public static PlayFragment getInstance() {
if(instance == null)
Expand All @@ -524,7 +527,7 @@ public static PlayFragment getInstance() {
return instance;
}

private PlayFragment() {
public PlayFragment() {
super();
googleAPI = GoogleApiAvailability.getInstance();
}
Expand All @@ -533,6 +536,7 @@ private PlayFragment() {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup v = (ViewGroup) inflater.inflate(R.layout.fragment_welcome_play, container, false);

img = (ImageView) v.findViewById(R.id.img);
button = (Button) v.findViewById(R.id.recover);
message = (TextView) v.findViewById(R.id.message);

Expand Down Expand Up @@ -583,7 +587,7 @@ public void onPlayServicesAvailable() {
Log.v(TAG, "onPlayServicesAvailable()");
message.setText(getString(R.string.play_services_now_available));
button.setVisibility(View.GONE);

img.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.ic_assignment_turned_in_white_48dp));
ActivityWelcome.class.cast(getActivity()).enablePagerNext();
}

Expand All @@ -595,7 +599,7 @@ public void onPlayServicesUnavailableRecoverable(final int resultCode) {
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

googleAPI.getErrorDialog(getActivity(), resultCode, RECOVER_PLAY).show();
PendingIntent p = googleAPI.getErrorResolutionPendingIntent(getActivity(), resultCode, RECOVER_PLAY);
try {
p.send();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public abstract class AdapterCursorLoader extends RecyclerView.Adapter<RecyclerV

private static final String TAG = "AdapterCursorLoader";
private static final String ID_COLUMN = "_id";
private final Context mContext;
private OnViewHolderClickListener onViewHolderClickListener;

public static class ClickableViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
public View rootView;
private OnViewHolderClickListener<ClickableViewHolder> onClickListener;

private Drawable defaultBackground;

public ClickableViewHolder(View view) {
super(view);
this.rootView = view;
Expand All @@ -33,20 +33,19 @@ public ClickableViewHolder(View view) {
public void setSelected(boolean selected) {
if(selected && !this.rootView.isSelected()) {
defaultBackground = this.rootView.getBackground();
this.rootView.setBackgroundDrawable(ContextCompat.getDrawable(this.rootView.getContext(), R.drawable.selectable_row));
this.rootView.setBackgroundResource(R.drawable.selectable_row);
this.rootView.setSelected(true);
return;
}

if(!selected && this.rootView.isSelected()) {
} else if(!selected && this.rootView.isSelected()) {
defaultBackground.setVisible(false, false);
this.rootView.setBackgroundDrawable(defaultBackground);
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
rootView.setBackgroundDrawable(defaultBackground);
} else {
rootView.setBackground(defaultBackground);
}

this.rootView.setSelected(false);
defaultBackground.setVisible(true, false);

return;
}

}

@Override
Expand All @@ -58,9 +57,7 @@ public void onClick(View v) {

@Override
public boolean onLongClick(View v) {
if(onClickListener != null)
return this.onClickListener.onViewHolderLongClick(v, this);
return false;
return onClickListener != null && this.onClickListener.onViewHolderLongClick(v, this);
}

public void setOnViewHolderClickListener(OnViewHolderClickListener listener) {
Expand All @@ -76,11 +73,9 @@ public void setOnViewHolderClickListener(OnViewHolderClickListener listener) {


AdapterCursorLoader(Context context) {
mContext = context;
mCursor = null;
mDataValid = false;
setHasStableIds(true);

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.github.curioustechizen.ago.RelativeTimeTextView;

import org.owntracks.android.App;
import org.owntracks.android.R;
import org.owntracks.android.db.WaypointDao;
import org.w3c.dom.Text;

import java.util.Date;

Expand Down Expand Up @@ -61,8 +57,7 @@ public ItemViewHolder(View view) {
@Override
public ClickableViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_waypoint, parent, false);
ItemViewHolder vh = new ItemViewHolder(itemView);
return vh;
return new ItemViewHolder(itemView);
}


Expand All @@ -71,12 +66,9 @@ public ClickableViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor, int position) {
((ItemViewHolder)viewHolder).mTitle.setText(cursor.getString(cursor.getColumnIndex(WaypointDao.Properties.Description.columnName)));

//((ItemViewHolder) viewHolder).mDetails.setReferenceTime(cursor.getLong(cursor.getColumnIndex(WaypointDao.Properties.LastTriggered.columnName)) * 1000);
//((ItemViewHolder) viewHolder).mTime.setPrefix("#" + cursor.getString(cursor.getColumnIndex(MessageDao.Properties.Channel.columnName)) + ", ");
boolean geofence = cursor.getInt(cursor.getColumnIndex(WaypointDao.Properties.GeofenceRadius.columnName)) > 0;
String uuid = cursor.getString(cursor.getColumnIndex(WaypointDao.Properties.BeaconUUID.columnName));
boolean beaconUUID = uuid != null && uuid.length() > 0;
Log.v("AdapterWaypoints", "geofence " +geofence + " uuid " + beaconUUID);

if(geofence || beaconUUID) {
long lastTriggered = cursor.getLong(cursor.getColumnIndex(WaypointDao.Properties.LastTriggered.columnName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.databinding.BindingMethod;
import android.databinding.BindingMethods;

import com.github.curioustechizen.ago.RelativeTimeTextView;

public class BindingConversions {
private static final String EMPTY_STRING = "";
Expand All @@ -28,9 +27,4 @@ public static String convertIntegerToString(Integer d) {
return d != null? d.toString() : EMPTY_STRING;
}


@BindingAdapter("rttv:reference_time")
public static void setReferenceTime(RelativeTimeTextView view, long time) {
view.setReferenceTime(time);
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/owntracks/android/support/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ public static void importFromMessage(MessageConfiguration m) {
if(m.containsKey(Keys.MODE_ID))
setMode((Integer) m.get(Keys.MODE_ID));

// Don't show setup on first start if a config has been imported
setSetupCompleted();


for(String key : m.getKeys()) {
try {
Log.v(TAG, "import for key: " + key + " with value: " + m.get(key));
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/res/drawable/selectable_row.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Color when the row is selected -->
<item android:drawable="@color/md_grey_300b" />
<item android:drawable="@color/md_grey_300" />
</selector>

8 changes: 4 additions & 4 deletions src/main/res/layout/fragment_welcome_done.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_verified_user_white_48dp"
android:src="@drawable/ic_done_all_white_48dp"
android:layout_gravity="center_horizontal"
android:layout_alignParentTop="true"

Expand All @@ -34,9 +34,9 @@
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:gravity="bottom|center_horizontal"
android:layout_alignLeft="@+id/radioSex"
android:layout_alignStart="@+id/radioSex"
android:layout_below="@+id/img" />
android:layout_below="@+id/img"
android:layout_marginBottom="8dp"
/>

<TextView
android:id="@+id/screen_desc"
Expand Down
6 changes: 3 additions & 3 deletions src/main/res/layout/fragment_welcome_intro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@


<ImageView
android:layout_marginTop="48dp"
android:layout_marginBottom="48dp"
android:layout_marginTop="32dp"
android:layout_marginBottom="32dp"


android:id="@+id/img"
Expand All @@ -35,7 +35,7 @@
android:text="Welcome"
android:paddingLeft="24dp"
android:paddingRight="24dp"

android:layout_marginBottom="8dp"
android:layout_below="@+id/img"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
Expand Down
6 changes: 3 additions & 3 deletions src/main/res/layout/fragment_welcome_mode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:gravity="bottom|center_horizontal"
android:layout_alignLeft="@+id/radioSex"
android:layout_alignStart="@+id/radioSex"
android:layout_below="@+id/img" />
android:layout_below="@+id/img"
android:layout_marginBottom="8dp"
/>

<TextView
android:id="@+id/screen_desc"
Expand Down
Loading

0 comments on commit 7d24005

Please sign in to comment.