Changeset View
Changeset View
Standalone View
Standalone View
src/app/src/org/kde/itinerary/Activity.java
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 37 | { | |||
---|---|---|---|---|---|
68 | public void launchViewIntentFromUri(String uri) | 68 | public void launchViewIntentFromUri(String uri) | ||
69 | { | 69 | { | ||
70 | Uri mapIntentUri = Uri.parse(uri); | 70 | Uri mapIntentUri = Uri.parse(uri); | ||
71 | Intent mapIntent = new Intent(Intent.ACTION_VIEW, mapIntentUri); | 71 | Intent mapIntent = new Intent(Intent.ACTION_VIEW, mapIntentUri); | ||
72 | startActivity(mapIntent); | 72 | startActivity(mapIntent); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | public native void importReservation(String data); | 75 | public native void importReservation(String data); | ||
76 | public native void importFromIntent(Intent data); | ||||
76 | 77 | | |||
77 | /** Check the calendar for with JSON-LD data. | 78 | /** Check the calendar for with JSON-LD data. | ||
78 | * This assumes the custom property serialization format used by DavDroid. | 79 | * This assumes the custom property serialization format used by DavDroid. | ||
79 | */ | 80 | */ | ||
80 | public void checkCalendar() | 81 | public void checkCalendar() | ||
81 | { | 82 | { | ||
82 | Calendar startTime = Calendar.getInstance(); | 83 | Calendar startTime = Calendar.getInstance(); | ||
83 | startTime.add(Calendar.DAY_OF_YEAR, -5); | 84 | startTime.add(Calendar.DAY_OF_YEAR, -5); | ||
Show All 39 Lines | 123 | runOnUiThread(new Runnable() { | |||
123 | @Override | 124 | @Override | ||
124 | public void run() { | 125 | public void run() { | ||
125 | WindowManager.LayoutParams layout = getWindow().getAttributes(); | 126 | WindowManager.LayoutParams layout = getWindow().getAttributes(); | ||
126 | layout.screenBrightness = 1F; | 127 | layout.screenBrightness = 1F; | ||
127 | getWindow().setAttributes(layout); | 128 | getWindow().setAttributes(layout); | ||
128 | } | 129 | } | ||
129 | }); | 130 | }); | ||
130 | } | 131 | } | ||
132 | | ||||
133 | @Override | ||||
134 | protected void onNewIntent(Intent intent) { | ||||
135 | super.onNewIntent(intent); | ||||
136 | importFromIntent(intent); | ||||
137 | } | ||||
131 | } | 138 | } |