Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BLEPrivacyPolicyNegotiator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
idic
BLEPrivacyPolicyNegotiator
Commits
c2949545
Commit
c2949545
authored
Mar 23, 2017
by
idic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配合Nordic Server端更改腳本~
parent
8038658a
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
168 additions
and
116 deletions
+168
-116
.idea/kotlinc.xml
.idea/kotlinc.xml
+7
-0
app/src/main/java/org/prlab/idic/privacypolicy/DeviceOperatorActivity.java
.../org/prlab/idic/privacypolicy/DeviceOperatorActivity.java
+131
-107
app/src/main/java/org/prlab/idic/privacypolicy/ReportActivity.java
...ain/java/org/prlab/idic/privacypolicy/ReportActivity.java
+2
-0
app/src/main/java/org/prlab/idic/privacypolicy/ble/BLECustomScript.java
...ava/org/prlab/idic/privacypolicy/ble/BLECustomScript.java
+1
-0
app/src/main/java/org/prlab/idic/privacypolicy/schedule/Scheduled.java
...java/org/prlab/idic/privacypolicy/schedule/Scheduled.java
+1
-1
app/src/main/java/org/prlab/idic/privacypolicy/tool/BaseUtils.java
...ain/java/org/prlab/idic/privacypolicy/tool/BaseUtils.java
+1
-2
app/src/main/res/drawable/ic_android_black_24dp.xml
app/src/main/res/drawable/ic_android_black_24dp.xml
+2
-0
app/src/main/res/drawable/ic_timer_black_24dp.xml
app/src/main/res/drawable/ic_timer_black_24dp.xml
+9
-0
app/src/main/res/drawable/ic_timer_off_black_24dp.xml
app/src/main/res/drawable/ic_timer_off_black_24dp.xml
+9
-0
app/src/main/res/layout/activity_device_operator.xml
app/src/main/res/layout/activity_device_operator.xml
+3
-4
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+1
-1
build.gradle
build.gradle
+1
-1
No files found.
.idea/kotlinc.xml
0 → 100644
View file @
c2949545
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"KotlinCommonCompilerArguments"
>
<option
name=
"languageVersion"
value=
"1.1"
/>
<option
name=
"apiVersion"
value=
"1.1"
/>
</component>
</project>
\ No newline at end of file
app/src/main/java/org/prlab/idic/privacypolicy/DeviceOperatorActivity.java
View file @
c2949545
This diff is collapsed.
Click to expand it.
app/src/main/java/org/prlab/idic/privacypolicy/ReportActivity.java
View file @
c2949545
...
...
@@ -34,6 +34,8 @@ import static org.prlab.idic.privacypolicy.tool.NegotiatorConstants.ACTIVITY_SEL
*/
public
class
ReportActivity
extends
Activity
implements
LoaderManager
.
LoaderCallbacks
<
PrivacyPolicyReport
>
{
private
static
final
String
TAG
=
ReportActivity
.
class
.
getSimpleName
();
private
LinearLayout
mReportLayout
;
private
TextView
mReportTitleTextView
;
private
TextView
mVersionTextView
;
...
...
app/src/main/java/org/prlab/idic/privacypolicy/ble/BLECustomScript.java
View file @
c2949545
...
...
@@ -15,6 +15,7 @@ public interface BLECustomScript {
void
onReadCharacteristicCompleted
(
BluetoothGatt
gatt
,
BluetoothGattCharacteristic
characteristic
,
int
status
,
byte
[]
values
);
void
onWriteDescriptorCompleted
(
BluetoothGatt
gatt
,
BluetoothGattDescriptor
descriptor
,
int
status
,
byte
[]
values
);
void
onReadDescriptorCompleted
(
BluetoothGatt
gatt
,
BluetoothGattDescriptor
descriptor
,
int
status
,
byte
[]
values
);
void
onNotificationReceived
(
BluetoothGatt
gatt
,
BluetoothGattCharacteristic
characteristic
);
void
onPairRequestReceived
(
BluetoothDevice
device
,
int
pin
);
void
onPaired
(
BluetoothDevice
device
);
void
onUnpaired
(
BluetoothDevice
device
);
...
...
app/src/main/java/org/prlab/idic/privacypolicy/schedule/Schedul
able
.java
→
app/src/main/java/org/prlab/idic/privacypolicy/schedule/Schedul
ed
.java
View file @
c2949545
...
...
@@ -3,7 +3,7 @@ package org.prlab.idic.privacypolicy.schedule;
/**
* Created by IDIC on 2017/2/24.
*/
public
interface
Schedul
able
{
public
interface
Schedul
ed
{
void
work
();
...
...
app/src/main/java/org/prlab/idic/privacypolicy/tool/BaseUtils.java
View file @
c2949545
package
org.prlab.idic.privacypolicy.tool
;
import
org.prlab.idic.privacypolicy.pojo.report.Layer
;
import
org.prlab.idic.privacypolicy.pojo.report.PrivacyPolicy
;
import
org.prlab.idic.privacypolicy.pojo.report.p3p.Remedy
;
import
java.nio.ByteBuffer
;
...
...
@@ -130,7 +129,7 @@ public class BaseUtils {
}
public
static
int
bytesToInt
(
byte
[]
bytes
)
{
return
ByteBuffer
.
wrap
(
bytes
).
getInt
();
return
bytes
.
length
==
1
?
bytes
[
0
]
:
ByteBuffer
.
wrap
(
bytes
).
getInt
();
}
}
app/src/main/res/drawable/ic_android_black_24dp.xml
View file @
c2949545
...
...
@@ -3,7 +3,9 @@
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M6,18c0,0.55 0.45,1 1,1h1v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L11,19h2v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L16,19h1c0.55,0 1,-0.45 1,-1L18,8L6,8v10zM3.5,8C2.67,8 2,8.67 2,9.5v7c0,0.83 0.67,1.5 1.5,1.5S5,17.33 5,16.5v-7C5,8.67 4.33,8 3.5,8zM20.5,8c-0.83,0 -1.5,0.67 -1.5,1.5v7c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5v-7c0,-0.83 -0.67,-1.5 -1.5,-1.5zM15.53,2.16l1.3,-1.3c0.2,-0.2 0.2,-0.51 0,-0.71 -0.2,-0.2 -0.51,-0.2 -0.71,0l-1.48,1.48C13.85,1.23 12.95,1 12,1c-0.96,0 -1.86,0.23 -2.66,0.63L7.85,0.15c-0.2,-0.2 -0.51,-0.2 -0.71,0 -0.2,0.2 -0.2,0.51 0,0.71l1.31,1.31C6.97,3.26 6,5.01 6,7h12c0,-1.99 -0.97,-3.75 -2.47,-4.84zM10,5L9,5L9,4h1v1zM15,5h-1L14,4h1v1z"
/>
</vector>
app/src/main/res/drawable/ic_timer_black_24dp.xml
0 → 100644
View file @
c2949545
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15,1L9,1v2h6L15,1zM11,14h2L13,8h-2v6zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"
/>
</vector>
app/src/main/res/drawable/ic_timer_off_black_24dp.xml
0 → 100644
View file @
c2949545
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M19.04,4.55l-1.42,1.42C16.07,4.74 14.12,4 12,4c-1.83,0 -3.53,0.55 -4.95,1.48l1.46,1.46C9.53,6.35 10.73,6 12,6c3.87,0 7,3.13 7,7 0,1.27 -0.35,2.47 -0.94,3.49l1.45,1.45C20.45,16.53 21,14.83 21,13c0,-2.12 -0.74,-4.07 -1.97,-5.61l1.42,-1.42 -1.41,-1.42zM15,1L9,1v2h6L15,1zM11,9.44l2,2L13,8h-2v1.44zM3.02,4L1.75,5.27 4.5,8.03C3.55,9.45 3,11.16 3,13c0,4.97 4.02,9 9,9 1.84,0 3.55,-0.55 4.98,-1.5l2.5,2.5 1.27,-1.27 -7.71,-7.71L3.02,4zM12,20c-3.87,0 -7,-3.13 -7,-7 0,-1.28 0.35,-2.48 0.95,-3.52l9.56,9.56c-1.03,0.61 -2.23,0.96 -3.51,0.96z"
/>
</vector>
app/src/main/res/layout/activity_device_operator.xml
View file @
c2949545
...
...
@@ -29,7 +29,7 @@
android:layout_height=
"@dimen/item_size"
>
<ImageButton
android:src=
"@drawable/ic_
android
_black_24dp"
android:src=
"@drawable/ic_
timer
_black_24dp"
android:id=
"@+id/button_operation_send_temperature"
android:layout_alignParentEnd=
"true"
android:layout_width=
"@dimen/item_size"
...
...
@@ -55,7 +55,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/item_size"
/>
<
EditText
<
TextView
android:id=
"@+id/edit_operation_current_temperature"
android:layout_marginStart=
"@dimen/activity_horizontal_margin"
android:layout_toStartOf=
"@id/text_operation_temperature_unit"
...
...
@@ -65,8 +65,7 @@
android:gravity=
"center_vertical|end"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/item_size"
android:labelFor=
"@id/text_operation_current_temperature"
android:inputType=
"number"
/>
android:labelFor=
"@id/text_operation_current_temperature"
/>
</RelativeLayout>
...
...
app/src/main/res/values/strings.xml
View file @
c2949545
...
...
@@ -20,7 +20,7 @@
<string
name=
"message_enable_first"
>
Enable Bluetooth first. Press scanning button again.
</string>
<string
name=
"message_current_temperature"
>
Current temperature
</string>
<string
name=
"message_air_purifier_status"
>
Air Purifier state
</string>
<string
name=
"message_air_purifier_status"
>
State of air purifier
</string>
<string
name=
"message_choose_policy"
>
The policies you need to choose as follows.
</string>
<string
name=
"message_collect_data"
>
We may collect data as follows.
</string>
...
...
build.gradle
View file @
c2949545
...
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.2.
0
'
classpath
'com.android.tools.build:gradle:2.2.
2
'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment