Skip to content

Commit 6bb8193

Browse files
authored
Cleanup minor things (#114)
Signed-off-by: Boram Bae <[email protected]>
1 parent d19e48b commit 6bb8193

File tree

25 files changed

+48
-49
lines changed

25 files changed

+48
-49
lines changed

packages/audioplayers/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: audioplayers_tizen_example
22
description: Demonstrates how to use the audioplayers plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
audioplayers: ^0.18.3

packages/battery/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: battery_example
22
description: Demonstrates how to use the battery_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
battery: ^2.0.1

packages/camera/tizen/src/camera_device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
static uint64_t Timestamp() {
2020
struct timeval tv;
21-
gettimeofday(&tv, NULL);
21+
gettimeofday(&tv, nullptr);
2222
return (uint64_t)tv.tv_sec * 1000UL + tv.tv_usec / 1000UL;
2323
}
2424

packages/connectivity/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: connectivity_example
22
description: Demonstrates how to use the connectivity_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
connectivity: ^3.0.3

packages/device_info/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: device_info_example
22
description: Demonstrates how to use the device_info_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
device_info_tizen:

packages/device_info/tizen/src/device_info_tizen_plugin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class DeviceInfoTizenPlugin : public flutter::Plugin {
4747
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) {
4848
LOG_INFO("method : %s", method_call.method_name().data());
4949

50-
char *value = NULL;
50+
char *value = nullptr;
5151
flutter::EncodableMap msg;
5252
int ret;
5353
bool hasResult = false;

packages/flutter_tts/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_tts_tizen_example
22
description: Demonstrates how to use the flutter_tts_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:
@@ -18,7 +18,7 @@ dev_dependencies:
1818
sdk: flutter
1919
integration_test_tizen:
2020
path: ../../integration_test/
21-
21+
2222
flutter:
2323
uses-material-design: true
2424

packages/image_picker/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: image_picker_tizen_example
22
description: Demonstrates how to use the image_picker_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/image_picker/tizen/src/image_picker_tizen_plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class ImagePickerTizenPlugin : public flutter::Plugin {
177177
void PickContent() {
178178
if (mime_type_.size() == 0) return;
179179

180-
app_control_h handle = NULL;
180+
app_control_h handle = nullptr;
181181
int ret = app_control_create(&handle);
182182
RET_IF_ERROR(ret);
183183

@@ -224,7 +224,7 @@ class ImagePickerTizenPlugin : public flutter::Plugin {
224224
return;
225225
}
226226

227-
char **value = NULL;
227+
char **value = nullptr;
228228
int count = 0;
229229
int ret = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED,
230230
&value, &count);

packages/image_picker/tizen/src/image_resize.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ bool ImageResize::TransformImage(transformation_h transform_h,
4444
image_util_image_h& dst_image) {
4545
unsigned int org_width;
4646
unsigned int org_height;
47-
int ret = image_util_get_image(src_image, &org_width, &org_height, NULL, NULL,
48-
NULL);
47+
int ret = image_util_get_image(src_image, &org_width, &org_height, nullptr,
48+
nullptr, nullptr);
4949
if (ret != IMAGE_UTIL_ERROR_NONE) {
5050
LOG_ERROR("image_util_get_image fail! [%s]", get_error_message(ret));
5151
return false;
@@ -144,9 +144,9 @@ bool ImageResize::Resize(const std::string& src_file, std::string& dst_file) {
144144
}
145145

146146
// ===========================================================
147-
image_util_image_h src_image = NULL;
148-
image_util_image_h dst_image = NULL;
149-
image_util_decode_h decode_h = NULL;
147+
image_util_image_h src_image = nullptr;
148+
image_util_image_h dst_image = nullptr;
149+
image_util_decode_h decode_h = nullptr;
150150

151151
int ret = image_util_decode_create(&decode_h);
152152
if (ret != IMAGE_UTIL_ERROR_NONE) {
@@ -163,7 +163,7 @@ bool ImageResize::Resize(const std::string& src_file, std::string& dst_file) {
163163
}
164164

165165
// ===========================================================
166-
transformation_h transform_h = NULL;
166+
transformation_h transform_h = nullptr;
167167
ret = image_util_transform_create(&transform_h);
168168
if (ret != IMAGE_UTIL_ERROR_NONE) {
169169
LOG_ERROR("image_util_transform_create fail! [%s]", get_error_message(ret));
@@ -218,7 +218,7 @@ bool ImageResize::Resize(const std::string& src_file, std::string& dst_file) {
218218
}
219219
}
220220

221-
image_util_encode_h encode_h = NULL;
221+
image_util_encode_h encode_h = nullptr;
222222
ret = image_util_encode_create(encoder_type, &encode_h);
223223
if (ret != IMAGE_UTIL_ERROR_NONE) {
224224
LOG_ERROR("image_util_encode_create fail! [%s]", get_error_message(ret));

packages/integration_test/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: integration_test_example
22
description: Demonstrates how to use the integration_test_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/package_info/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: package_info_example
22
description: Demonstrates how to use the package_info_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/package_info/tizen/src/package_info_tizen_plugin.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,46 @@ class PackageInfoTizenPlugin : public flutter::Plugin {
5454
return;
5555
}
5656

57-
char *app_id = NULL;
58-
char *pkg_name = NULL;
59-
char *version = NULL;
60-
char *label = NULL;
61-
package_info_h package_info = NULL;
57+
char *app_id = nullptr;
58+
char *pkg_name = nullptr;
59+
char *version = nullptr;
60+
char *label = nullptr;
61+
package_info_h package_info = nullptr;
6262
flutter::EncodableMap msg;
6363

6464
int ret = app_get_id(&app_id);
65-
if (ret != APP_ERROR_NONE || app_id == NULL) {
65+
if (ret != APP_ERROR_NONE || app_id == nullptr) {
6666
result->Error(std::to_string(ret), "Failed to get app_id",
6767
flutter::EncodableValue(get_error_message(ret)));
6868
goto cleanup;
6969
}
7070
LOG_INFO("app id : %s\n", app_id);
7171

7272
ret = package_info_create(app_id, &package_info);
73-
if (ret != PACKAGE_MANAGER_ERROR_NONE || package_info == NULL) {
73+
if (ret != PACKAGE_MANAGER_ERROR_NONE || package_info == nullptr) {
7474
result->Error(std::to_string(ret), "Failed to create package_info",
7575
flutter::EncodableValue(get_error_message(ret)));
7676
goto cleanup;
7777
}
7878

7979
ret = package_info_get_label(package_info, &label);
80-
if (ret != PACKAGE_MANAGER_ERROR_NONE || label == NULL) {
80+
if (ret != PACKAGE_MANAGER_ERROR_NONE || label == nullptr) {
8181
result->Error(std::to_string(ret), "Failed to get app name",
8282
flutter::EncodableValue(get_error_message(ret)));
8383
goto cleanup;
8484
}
8585
LOG_INFO("package label : %s\n", label);
8686

8787
ret = package_info_get_package(package_info, &pkg_name);
88-
if (ret != PACKAGE_MANAGER_ERROR_NONE || pkg_name == NULL) {
88+
if (ret != PACKAGE_MANAGER_ERROR_NONE || pkg_name == nullptr) {
8989
result->Error(std::to_string(ret), "Failed to get package name",
9090
flutter::EncodableValue(get_error_message(ret)));
9191
goto cleanup;
9292
}
9393
LOG_INFO("package name : %s\n", pkg_name);
9494

9595
ret = package_info_get_version(package_info, &version);
96-
if (ret != PACKAGE_MANAGER_ERROR_NONE || version == NULL) {
96+
if (ret != PACKAGE_MANAGER_ERROR_NONE || version == nullptr) {
9797
result->Error(std::to_string(ret), "Failed to get version",
9898
flutter::EncodableValue(get_error_message(ret)));
9999
goto cleanup;

packages/path_provider/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: path_provider_tizen_example
22
description: Demonstrates how to use the path_provider_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/permission_handler/tizen/src/app_settings_manager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void AppSettingsManager::OpenAppSettings(OnAppSettingsOpened success_callback,
1818
}
1919

2020
app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING);
21-
result = app_control_send_launch_request(service, NULL, NULL);
21+
result = app_control_send_launch_request(service, nullptr, nullptr);
2222
app_control_destroy(service);
2323
if (result == APP_CONTROL_ERROR_NONE) {
2424
LOG_DEBUG("successed to open app settings");

packages/sensors/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sensors_example
22
description: Demonstrates how to use the sensors plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/share/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: share_example
22
description: Demonstrates how to use the share_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:
77
sdk: flutter
88
image_picker: ^0.7.3
99
image_picker_tizen:
1010
path: ../../image_picker/
11-
share: ^2.0.1
11+
share: ^2.0.1
1212
share_tizen:
1313
path: ../
1414

packages/share/tizen/src/share_tizen_plugin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class ShareTizenPlugin : public flutter::Plugin {
154154
ret = app_control_set_launch_mode(handle, APP_CONTROL_LAUNCH_MODE_GROUP);
155155
RET_IF_ERROR(ret);
156156

157-
ret = app_control_send_launch_request(handle, NULL, NULL);
157+
ret = app_control_send_launch_request(handle, nullptr, nullptr);
158158
RET_IF_ERROR(ret);
159159

160160
if (handle) {

packages/shared_preferences/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: shared_preferences_tizen_example
22
description: Demonstrates how to use the shared_preferences_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/url_launcher/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: url_launcher_example
22
description: Demonstrates how to use the url_launcher_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:

packages/video_player/example/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: video_player_example
22
description: Demonstrates how to use the video_player_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
flutter:
@@ -23,9 +23,9 @@ dev_dependencies:
2323
flutter:
2424
uses-material-design: true
2525
assets:
26-
- assets/flutter-mark-square-64.png
27-
- assets/Butterfly-209.mp4
28-
- assets/bumble_bee_captions.srt
26+
- assets/flutter-mark-square-64.png
27+
- assets/Butterfly-209.mp4
28+
- assets/bumble_bee_captions.srt
2929

3030
environment:
3131
sdk: ">=2.12.0 <3.0.0"

packages/wakelock/example/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wakelock_tizen_example
22
description: Demonstrates how to use the wakelock_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
environment:
66
sdk: ">=2.12.0 <3.0.0"
@@ -22,4 +22,3 @@ dev_dependencies:
2222
sdk: flutter
2323
integration_test_tizen:
2424
path: ../../integration_test/
25-

packages/webview_flutter/tizen/src/webview.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ void WebView::DispatchCompositionEndEvent(const char* str, int size) {
704704
void WebView::ShowPanel() {
705705
LOG_DEBUG("WebView::ShowPanel()");
706706
if (!context_) {
707-
LOG_ERROR("Ecore_IMF_Context NULL");
707+
LOG_ERROR("Ecore_IMF_Context nullptr");
708708
return;
709709
}
710710
ecore_imf_context_input_panel_show(context_);
@@ -714,7 +714,7 @@ void WebView::ShowPanel() {
714714
void WebView::HidePanel() {
715715
LOG_DEBUG("WebView::HidePanel()");
716716
if (!context_) {
717-
LOG_ERROR("Ecore_IMF_Context NULL");
717+
LOG_ERROR("Ecore_IMF_Context nullptr");
718718
return;
719719
}
720720
ecore_imf_context_reset(context_);

packages/wifi_info_flutter/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wifi_info_flutter_tizen_example
22
description: Demonstrates how to use the wifi_info_flutter_tizen plugin.
3-
publish_to: 'none'
3+
publish_to: "none"
44

55
dependencies:
66
connectivity: ^3.0.3

packages/wifi_info_flutter/tizen/src/wifi_info_flutter_tizen_plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class WifiInfoFlutterTizenPlugin : public flutter::Plugin {
5353
std::string GetWifiInfo(WifiInfoType type) {
5454
std::string result;
5555
wifi_manager_ap_h current_ap = nullptr;
56-
char *name = NULL;
56+
char *name = nullptr;
5757
int errorcode;
5858

5959
errorcode = wifi_manager_get_connected_ap(m_wifi_manager, &current_ap);
@@ -85,7 +85,7 @@ class WifiInfoFlutterTizenPlugin : public flutter::Plugin {
8585
} else if (method_call.method_name().compare("wifiBSSID") == 0) {
8686
replay = GetWifiInfo(WifiInfoType::BSSID);
8787
} else if (method_call.method_name().compare("wifiIPAddress") == 0) {
88-
char *ip_addr = NULL;
88+
char *ip_addr = nullptr;
8989
if (connection_get_ip_address(m_connection,
9090
CONNECTION_ADDRESS_FAMILY_IPV4,
9191
&ip_addr) != CONNECTION_ERROR_NONE) {

0 commit comments

Comments
 (0)