Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
bf57b095
Commit
bf57b095
authored
Jan 11, 2018
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Java 1.6 compatibility [fixes #1500]
parent
e483eee1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
Builder.java
src/android/notification/Builder.java
+0
-1
Manager.java
src/android/notification/Manager.java
+0
-1
Notification.java
src/android/notification/Notification.java
+4
-3
Options.java
src/android/notification/Options.java
+5
-2
No files found.
src/android/notification/Builder.java
View file @
bf57b095
...
@@ -45,7 +45,6 @@ import static de.appplant.cordova.plugin.notification.Notification.EXTRA_UPDATE;
...
@@ -45,7 +45,6 @@ import static de.appplant.cordova.plugin.notification.Notification.EXTRA_UPDATE;
* Builder class for local notifications. Build fully configured local
* Builder class for local notifications. Build fully configured local
* notification specified by JSON object passed from JS side.
* notification specified by JSON object passed from JS side.
*/
*/
@SuppressWarnings
(
"Convert2Diamond"
)
public
final
class
Builder
{
public
final
class
Builder
{
// Application context passed by constructor
// Application context passed by constructor
...
...
src/android/notification/Manager.java
View file @
bf57b095
...
@@ -50,7 +50,6 @@ import static de.appplant.cordova.plugin.notification.Notification.Type.TRIGGERE
...
@@ -50,7 +50,6 @@ import static de.appplant.cordova.plugin.notification.Notification.Type.TRIGGERE
* state like triggered or scheduled. Offers shortcut ways to schedule,
* state like triggered or scheduled. Offers shortcut ways to schedule,
* cancel or clear local notifications.
* cancel or clear local notifications.
*/
*/
@SuppressWarnings
(
"Convert2Diamond"
)
public
final
class
Manager
{
public
final
class
Manager
{
// TODO: temporary
// TODO: temporary
...
...
src/android/notification/Notification.java
View file @
bf57b095
...
@@ -56,7 +56,6 @@ import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MIN;
...
@@ -56,7 +56,6 @@ import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MIN;
* Wrapper class around OS notification class. Handles basic operations
* Wrapper class around OS notification class. Handles basic operations
* like show, delete, cancel for a single local notification instance.
* like show, delete, cancel for a single local notification instance.
*/
*/
@SuppressWarnings
(
"Convert2Diamond"
)
public
final
class
Notification
{
public
final
class
Notification
{
// Used to differ notifications by their life cycle state
// Used to differ notifications by their life cycle state
...
@@ -77,7 +76,7 @@ public final class Notification {
...
@@ -77,7 +76,7 @@ public final class Notification {
private
static
final
String
PREF_KEY_PID
=
"NOTIFICATION_PID"
;
private
static
final
String
PREF_KEY_PID
=
"NOTIFICATION_PID"
;
// Cache for the builder instances
// Cache for the builder instances
static
SparseArray
<
NotificationCompat
.
Builder
>
cache
=
null
;
private
static
SparseArray
<
NotificationCompat
.
Builder
>
cache
=
null
;
// Application context passed by constructor
// Application context passed by constructor
private
final
Context
context
;
private
final
Context
context
;
...
@@ -246,7 +245,9 @@ public final class Notification {
...
@@ -246,7 +245,9 @@ public final class Notification {
try
{
try
{
receiver
=
(
BroadcastReceiver
)
cls
.
newInstance
();
receiver
=
(
BroadcastReceiver
)
cls
.
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
e
)
{
}
catch
(
InstantiationException
e
)
{
return
false
;
}
catch
(
IllegalAccessException
e
)
{
return
false
;
return
false
;
}
}
...
...
src/android/notification/Options.java
View file @
bf57b095
...
@@ -54,7 +54,6 @@ import static android.support.v4.app.NotificationCompat.VISIBILITY_SECRET;
...
@@ -54,7 +54,6 @@ import static android.support.v4.app.NotificationCompat.VISIBILITY_SECRET;
* possible option values. Class provides simple readers and more advanced
* possible option values. Class provides simple readers and more advanced
* methods to convert independent values into platform specific values.
* methods to convert independent values into platform specific values.
*/
*/
@SuppressWarnings
(
"Convert2Diamond"
)
public
final
class
Options
{
public
final
class
Options
{
// Key name for bundled sound extra
// Key name for bundled sound extra
...
@@ -322,7 +321,11 @@ public final class Options {
...
@@ -322,7 +321,11 @@ public final class Options {
int
aRGB
=
Integer
.
parseInt
(
hex
,
16
);
int
aRGB
=
Integer
.
parseInt
(
hex
,
16
);
return
aRGB
+
0xFF000000
;
return
aRGB
+
0xFF000000
;
}
catch
(
NumberFormatException
|
NoSuchFieldException
|
IllegalAccessException
e
)
{
}
catch
(
NumberFormatException
e
)
{
e
.
printStackTrace
();
}
catch
(
NoSuchFieldException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
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