Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code quality fix - Utility classes should not have public constructors. #12

Merged
merged 1 commit into from Jun 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -8,6 +8,8 @@
*/
public class AudioUtil {

private AudioUtil() {}

private static final Object mSingletonLock = new Object();
private static AudioManager audioManager;

Expand Down
Expand Up @@ -10,6 +10,8 @@
*/
public class StatusBarUtil {

private StatusBarUtil() {}

public static void hide(Activity activity) {
if (Build.VERSION.SDK_INT < 16) {
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
Expand Down
Expand Up @@ -14,6 +14,8 @@
*/
public class YouTubeApp {

private YouTubeApp() {}

public static void startVideo(@NonNull Context context, @NonNull String videoId) {
Uri video_uri = Uri.parse(YouTubeUrlParser.getVideoUrl(videoId));
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:" + videoId));
Expand Down
Expand Up @@ -8,8 +8,12 @@
* Created by TheFinestArtist on 6/27/15.
*/
public class YouTubeThumbnail {

public static final String IMG_YOUTUBE_COM_VI = "http://img.youtube.com/vi/";
// Each YouTube video has 4 generated images. They are predictably formatted as follows:

private YouTubeThumbnail() {}

// Each YouTube video has 4 generated images. They are predictably formatted as follows:
//
// http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
// http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
Expand Down
Expand Up @@ -10,6 +10,8 @@
*/
public class YouTubeUrlParser {

private YouTubeUrlParser() {}

// (?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})
final static String reg = "(?:youtube(?:-nocookie)?\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?)\\/|\\S*?[?&]v=)|youtu\\.be\\/)([a-zA-Z0-9_-]{11})";

Expand Down
Expand Up @@ -16,6 +16,8 @@ public class AdHelper {
private static InterstitialAd interstitial = null;
private static final Object lock = new Object();

private AdHelper() {}

public static void loadBannerAd(AdView adView) {
try {
adView.loadAd(new AdRequest.Builder()
Expand Down