@@ -23,15 +23,18 @@ private IntentUtils() {
2323 * @param site The website that should be opened
2424 */
2525 public static void openSite (final Context context , final String site ) {
26- if (context == null ) throw new NullPointerException ("Context cannot be null!" );
27- if (site == null ) throw new NullPointerException ("Site cannot be null!" );
28- if (site .length () == 0 ) throw new IllegalArgumentException ("Site cannot be empty!" );
26+ if (context == null )
27+ throw new NullPointerException ("Context cannot be null!" );
28+ if (site == null )
29+ throw new NullPointerException ("Site cannot be null!" );
30+ if (site .length () == 0 )
31+ throw new IllegalArgumentException ("Site cannot be empty!" );
2932
3033 try {
3134 final Uri uriUrl = Uri .parse (site );
3235 final Intent launchBrowser = new Intent (Intent .ACTION_VIEW , uriUrl );
3336 context .startActivity (launchBrowser );
34- } catch (Exception ex ) {
37+ } catch (final Exception ex ) {
3538 Toast .makeText (context , context .getString (R .string .error_website ), Toast .LENGTH_SHORT ).show ();
3639 }
3740 }
@@ -42,13 +45,14 @@ public static void openSite(final Context context, final String site) {
4245 * @param context The Context that can be used to open the Play Store
4346 */
4447 public static void openPlayStore (final Context context ) {
45- if (context == null ) throw new NullPointerException ("Context cannot be null!" );
48+ if (context == null )
49+ throw new NullPointerException ("Context cannot be null!" );
4650
4751 final Intent intent = new Intent (Intent .ACTION_VIEW );
4852 try {
4953 intent .setData (Uri .parse ("market://details?id=com.codedead.deadhash" ));
5054 context .startActivity (intent );
51- } catch (Exception ignored ) {
55+ } catch (final Exception ignored ) {
5256 Toast .makeText (context , context .getString (R .string .error_playstore ), Toast .LENGTH_SHORT ).show ();
5357 }
5458 }
0 commit comments