Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.net.Uri;

import java.io.File;

public class Main {
    public static boolean deleteTempPic(Uri paramUri) {
        if (!isTempPic(paramUri))
            return false;
        return new File(paramUri.getPath()).delete();
    }

    public static boolean isTempPic(Uri paramUri) {
        return (paramUri != null) && (paramUri.getLastPathSegment() != null)
                && (paramUri.getLastPathSegment().startsWith("pic-"));
    }
}