Skip to content

Commit a716015

Browse files
committed
Added lisence header
1 parent 990dda4 commit a716015

32 files changed

+1652
-1172
lines changed

java/src/main/java/org/astonbitecode/rustkeylock/MainActivity.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright 2017 astonbitecode
2+
// This file is part of rust-keylock password manager.
3+
//
4+
// rust-keylock is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// rust-keylock is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with rust-keylock. If not, see <http://www.gnu.org/licenses/>.
116
package org.astonbitecode.rustkeylock;
217

318
import android.app.Activity;
Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright 2017 astonbitecode
2+
// This file is part of rust-keylock password manager.
3+
//
4+
// rust-keylock is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// rust-keylock is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with rust-keylock. If not, see <http://www.gnu.org/licenses/>.
116
package org.astonbitecode.rustkeylock.adapters;
217

318
import java.util.List;
@@ -14,34 +29,34 @@
1429
import android.widget.TextView;
1530

1631
public class DirectoriesAdapter extends ArrayAdapter<DirectorySelector.DirectoryEntry> {
17-
private List<DirectorySelector.DirectoryEntry> entries;
18-
private Context context;
19-
private int layoutResourceId;
20-
21-
public DirectoriesAdapter(Context context, int resourceId, List<DirectorySelector.DirectoryEntry> entries) {
22-
super(context, resourceId, entries);
23-
this.entries = entries;
24-
this.context = context;
25-
this.layoutResourceId = resourceId;
26-
}
27-
28-
public View getView(int position, View convertView, ViewGroup parent) {
29-
View v = convertView;
30-
31-
if (v == null) {
32-
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
33-
v = inflater.inflate(layoutResourceId, parent, false);
34-
}
35-
36-
DirectorySelector.DirectoryEntry i = entries.get(position);
37-
38-
if (i != null) {
39-
TextView tvn = (TextView) v.findViewById(R.id.directoryname);
40-
41-
if (tvn != null) {
42-
tvn.setText(i.getName());
43-
}
44-
}
45-
return v;
46-
}
32+
private List<DirectorySelector.DirectoryEntry> entries;
33+
private Context context;
34+
private int layoutResourceId;
35+
36+
public DirectoriesAdapter(Context context, int resourceId, List<DirectorySelector.DirectoryEntry> entries) {
37+
super(context, resourceId, entries);
38+
this.entries = entries;
39+
this.context = context;
40+
this.layoutResourceId = resourceId;
41+
}
42+
43+
public View getView(int position, View convertView, ViewGroup parent) {
44+
View v = convertView;
45+
46+
if (v == null) {
47+
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
48+
v = inflater.inflate(layoutResourceId, parent, false);
49+
}
50+
51+
DirectorySelector.DirectoryEntry i = entries.get(position);
52+
53+
if (i != null) {
54+
TextView tvn = (TextView) v.findViewById(R.id.directoryname);
55+
56+
if (tvn != null) {
57+
tvn.setText(i.getName());
58+
}
59+
}
60+
return v;
61+
}
4762
}
Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright 2017 astonbitecode
2+
// This file is part of rust-keylock password manager.
3+
//
4+
// rust-keylock is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// rust-keylock is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with rust-keylock. If not, see <http://www.gnu.org/licenses/>.
116
package org.astonbitecode.rustkeylock.adapters;
217

318
import java.util.List;
@@ -14,34 +29,34 @@
1429
import android.widget.TextView;
1530

1631
public class EntriesAdapter extends ArrayAdapter<JavaEntry> {
17-
private List<JavaEntry> entries;
18-
private Context context;
19-
private int layoutResourceId;
20-
21-
public EntriesAdapter(Context context, int resourceId, List<JavaEntry> entries) {
22-
super(context, resourceId, entries);
23-
this.entries = entries;
24-
this.context = context;
25-
this.layoutResourceId = resourceId;
26-
}
27-
28-
public View getView(int position, View convertView, ViewGroup parent) {
29-
View v = convertView;
30-
31-
if (v == null) {
32-
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
33-
v = inflater.inflate(layoutResourceId, parent, false);
34-
}
35-
36-
JavaEntry i = entries.get(position);
37-
38-
if (i != null) {
39-
TextView tvn = (TextView) v.findViewById(R.id.entryname);
40-
41-
if (tvn != null) {
42-
tvn.setText(i.getName());
43-
}
44-
}
45-
return v;
46-
}
32+
private List<JavaEntry> entries;
33+
private Context context;
34+
private int layoutResourceId;
35+
36+
public EntriesAdapter(Context context, int resourceId, List<JavaEntry> entries) {
37+
super(context, resourceId, entries);
38+
this.entries = entries;
39+
this.context = context;
40+
this.layoutResourceId = resourceId;
41+
}
42+
43+
public View getView(int position, View convertView, ViewGroup parent) {
44+
View v = convertView;
45+
46+
if (v == null) {
47+
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
48+
v = inflater.inflate(layoutResourceId, parent, false);
49+
}
50+
51+
JavaEntry i = entries.get(position);
52+
53+
if (i != null) {
54+
TextView tvn = (TextView) v.findViewById(R.id.entryname);
55+
56+
if (tvn != null) {
57+
tvn.setText(i.getName());
58+
}
59+
}
60+
return v;
61+
}
4762
}
Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright 2017 astonbitecode
2+
// This file is part of rust-keylock password manager.
3+
//
4+
// rust-keylock is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// rust-keylock is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with rust-keylock. If not, see <http://www.gnu.org/licenses/>.
116
package org.astonbitecode.rustkeylock.adapters;
217

318
import java.util.List;
@@ -14,34 +29,34 @@
1429
import android.widget.TextView;
1530

1631
public class FilesAdapter extends ArrayAdapter<FileSelector.FileEntry> {
17-
private List<FileSelector.FileEntry> entries;
18-
private Context context;
19-
private int layoutResourceId;
20-
21-
public FilesAdapter(Context context, int resourceId, List<FileSelector.FileEntry> entries) {
22-
super(context, resourceId, entries);
23-
this.entries = entries;
24-
this.context = context;
25-
this.layoutResourceId = resourceId;
26-
}
27-
28-
public View getView(int position, View convertView, ViewGroup parent) {
29-
View v = convertView;
30-
31-
if (v == null) {
32-
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
33-
v = inflater.inflate(layoutResourceId, parent, false);
34-
}
35-
36-
FileSelector.FileEntry i = entries.get(position);
37-
38-
if (i != null) {
39-
TextView tvn = (TextView) v.findViewById(R.id.filename);
40-
41-
if (tvn != null) {
42-
tvn.setText(i.getName());
43-
}
44-
}
45-
return v;
46-
}
32+
private List<FileSelector.FileEntry> entries;
33+
private Context context;
34+
private int layoutResourceId;
35+
36+
public FilesAdapter(Context context, int resourceId, List<FileSelector.FileEntry> entries) {
37+
super(context, resourceId, entries);
38+
this.entries = entries;
39+
this.context = context;
40+
this.layoutResourceId = resourceId;
41+
}
42+
43+
public View getView(int position, View convertView, ViewGroup parent) {
44+
View v = convertView;
45+
46+
if (v == null) {
47+
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
48+
v = inflater.inflate(layoutResourceId, parent, false);
49+
}
50+
51+
FileSelector.FileEntry i = entries.get(position);
52+
53+
if (i != null) {
54+
TextView tvn = (TextView) v.findViewById(R.id.filename);
55+
56+
if (tvn != null) {
57+
tvn.setText(i.getName());
58+
}
59+
}
60+
return v;
61+
}
4762
}

java/src/main/java/org/astonbitecode/rustkeylock/api/InterfaceWithRust.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
// Copyright 2017 astonbitecode
2+
// This file is part of rust-keylock password manager.
3+
//
4+
// rust-keylock is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// rust-keylock is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with rust-keylock. If not, see <http://www.gnu.org/licenses/>.
116
package org.astonbitecode.rustkeylock.api;
217

318
import org.astonbitecode.rustkeylock.callbacks.ShowMessageCb;
@@ -120,7 +135,7 @@ void execute(RustCallback showMenuCb, EntryCallback showEntryCb, EntriesSetCallb
120135
* Provides to Rust a path to export to / import from
121136
*
122137
* @param path
123-
* @param export Bypass issues with boolean. 0 for false, > 0 for true
138+
* @param export Bypass issues with boolean. 0 for false, > 0 for true
124139
* @param password
125140
* @param number
126141
*/

0 commit comments

Comments
 (0)