|
@@ -439,7 +439,10 @@ var
|
|
AService: JObject;
|
|
AService: JObject;
|
|
begin
|
|
begin
|
|
AService := Context.getSystemService(TJContext.JavaClass.ACTIVITY_SERVICE);
|
|
AService := Context.getSystemService(TJContext.JavaClass.ACTIVITY_SERVICE);
|
|
- Result := TJActivityManager.Wrap((AService as ILocalObject).GetObjectID);
|
|
|
|
|
|
+ if AService <> nil then
|
|
|
|
+ Result := TJActivityManager.Wrap((AService as ILocalObject).GetObjectID)
|
|
|
|
+ else
|
|
|
|
+ Result := nil;
|
|
end;
|
|
end;
|
|
|
|
|
|
class function TAndroidHelperEx.GetJContext: JContext;
|
|
class function TAndroidHelperEx.GetJContext: JContext;
|