File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -98,22 +98,13 @@ pub mod android {
9898 string_to_jstring ( & env, obj. to_string ( ) )
9999 }
100100
101- lazy_static ! {
102- static ref ASSET_PATH : Mutex <String > = Mutex :: new( String :: new( ) ) ;
103- }
104-
105101 #[ no_mangle]
106102 pub unsafe extern "C" fn Java_net_activitywatch_android_RustInterface_startServer (
107103 env : JNIEnv ,
108104 _: JClass ,
109- java_asset_path : JString ,
110105 ) {
111106 info ! ( "Starting server..." ) ;
112-
113- * ASSET_PATH . lock ( ) . unwrap ( ) = jstring_to_string ( & env, java_asset_path) ;
114-
115107 start_server ( ) ;
116-
117108 info ! ( "Server exited" ) ;
118109 }
119110
@@ -125,12 +116,11 @@ pub mod android {
125116 unsafe {
126117 let server_state: ServerState = endpoints:: ServerState {
127118 datastore : Mutex :: new ( openDatastore ( ) ) ,
128- asset_path : PathBuf :: from ( ASSET_PATH . lock ( ) . unwrap ( ) . to_owned ( ) ) ,
119+ asset_resolver : endpoints :: AssetResolver :: new ( None ) ,
129120 device_id : device_id:: get_device_id ( ) ,
130121 } ;
131122 info ! (
132- "Using server_state:: asset dir: {}; device_id: {}" ,
133- server_state. asset_path. display( ) ,
123+ "Using server_state:: device_id: {}" ,
134124 server_state. device_id
135125 ) ;
136126
You can’t perform that action at this time.
0 commit comments