3535import java .util .Arrays ;
3636import java .util .List ;
3737
38-
38+ /* class to demonstarte use of Drive Activity list API */
3939public class DriveActivityQuickstart {
4040 /** Application name. */
4141 private static final String APPLICATION_NAME =
@@ -48,8 +48,7 @@ public class DriveActivityQuickstart {
4848 private static FileDataStoreFactory DATA_STORE_FACTORY ;
4949
5050 /** Global instance of the JSON factory. */
51- private static final JsonFactory JSON_FACTORY =
52- GsonFactory .getDefaultInstance ();
51+ private static final JsonFactory JSON_FACTORY = GsonFactory .getDefaultInstance ();
5352
5453 /** Global instance of the HTTP transport. */
5554 private static HttpTransport HTTP_TRANSPORT ;
@@ -97,6 +96,7 @@ public static Credential authorize() throws IOException {
9796 flow , new LocalServerReceiver ()).authorize ("user" );
9897 System .out .println (
9998 "Credentials saved to " + DATA_STORE_DIR .getAbsolutePath ());
99+ //returns an authorized Credential object.
100100 return credential ;
101101 }
102102
@@ -107,10 +107,11 @@ public static Credential authorize() throws IOException {
107107 */
108108 public static Appsactivity getAppsactivityService () throws IOException {
109109 Credential credential = authorize ();
110- return new Appsactivity .Builder (
110+ Appsactivity service = new Appsactivity .Builder (
111111 HTTP_TRANSPORT , JSON_FACTORY , credential )
112112 .setApplicationName (APPLICATION_NAME )
113113 .build ();
114+ return service ;
114115 }
115116
116117 public static void main (String [] args ) throws IOException {
0 commit comments